How to replace single to double quotes and wrap strings with double quotes in JSON?
So that :
{
'ns2:users': {
'$': {
'xmlns:ns2': 'identity.rest.mgmt.acs.nm.apple.com'
},
User: [{
description: [ 'Seb' ],
id: [ 'XXX' ],
name: [ 'SEB88' ],
changePassword: [ 'false' ],
created: [ 'Aug 19 2015 16:28:28' ],
Becomes
{
"ns2:users": {
"$": {
"xmlns:ns2": "identity.rest.mgmt.acs.nm.apple.com"
},
"User": [{
"description": ["Seb"],
"id": ["XXX"],
"name": ["SEB88"],
"changePassword": ["false"],
"created": ["Mar 20 2015 08:42:26"],