JsonString.txt
{ "profile": { "name": { "formatted": "John Jackson", "givenName": "John", "familyName": "Jackson" }, "verifiedEmail": "rpxstaging@gmail.com", "googleUserId": "1048morenumbers2048", "displayName": "John Jackson", "photo": " " , "preferredUsername": "rpxstaging", "url": " ", "providerName": "Google","identifier": " ", "birthday":"1994-05-19", "gender":"female", "email": "rpxstaging@gmail.com" }, "accessCredentials":{ "oauthToken":"1/V2UImanylettersandnumbersrnWlVS7c", "oauthTokenSecret":"i5rlettersQU-32moreVY", "scopes": "Blogger,Google Contacts,YouTube,Picasa Web,Albums,Google Calendar,Google Docs,Google Mail,Google OpenSocial" , "scope":" ", "type":"OAuth" }, "merged_poco": { "name": { "formatted": "John Jackson", "givenName": "John", "familyName": "Jackson" }, "addresses": [ { "country": "United States" } ], "photos": [ { "type": "other", "value": " " } ], "urls": [ { "type": "profile", "value": " " } ], "preferredUsername": "rpxstaging", "emails": [ { "type": "other", "value": "rpxstaging@gmail.com" } ], "languagesSpoken": [ "en-US" ], "id":"1048numbers2048", "displayName": "John Jackson", "profileUrl": " " }, "stat": "ok" }
- I need above jsonString to be converted to string which looks like below
String.txt
{ \"profile\": { \"name\": { \"formatted\": \"John Jackson\", \"givenName\": \"John\", \"familyName\": \"Jackson\" }, \"verifiedEmail\": \"rpxstaging@gmail.com\", \"googleUserId\": \"1048morenumbers2048\", \"displayName\": \"John Jackson\", \"photo\": \" \" , \"preferredUsername\": \"rpxstaging\", \"url\": \" \", \"providerName\": \"Google\", \"identifier\": \" \", \"birthday\":\"1994-05-19\", \"gender\":\"female\", \"email\": \"rpxstaging@gmail.com\" }, \"accessCredentials\":{ \"oauthToken\":\"1/V2UImanylettersandnumbersrnWlVS7c\", \"oauthTokenSecret\": \"i5rlettersQU-32moreVY\", \"scopes\": \"Blogger,Google Contacts,YouTube,Picasa Web Albums,Google Calendar,Google Docs,Google Mail,Google OpenSocial\" , \"scope\": \"\", \"type\": \"OAuth\" }, \"merged_poco\": { \"name\": { \"formatted\": \"John Jackson\", \"givenName\": \"John\", \"familyName\": \"Jackson\" }, \"addresses\": [ { \"country\": \"United States\" } ], \"photos\": [ { \"type\": \"other\", \"value\": \" " } ], \"urls\": [ { \"type\": \"profile\", \"value\": \" \" } ], \"preferredUsername\": \"rpxstaging\", \"emails\": [ { \"type\": \"other\", \"value\": \"rpxstaging@gmail.com\" } ], \"languagesSpoken\": [ \"en-US\" ], \"id\": \"1048numbers2048\", \"displayName\": \"John Jackson\", \"profileUrl\": \" \" }, \"stat\": \"ok\" }
- Can some one pls tell me how to convert? I am new to this JSON