Skip to main content

Timeline for Serializes STRING into JSON Format

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
Jun 9, 2016 at 10:55 vote accept Nick
Jun 9, 2016 at 10:30 history rollback Nick
Rollback to Revision 1
Jun 9, 2016 at 10:27 history edited Tushar Sharma CC BY-SA 3.0
added 4 characters in body
Jun 9, 2016 at 10:25 answer added Doug B timeline score: 5
Jun 9, 2016 at 10:23 comment added Saroj Bera String jsonResponse = '{"Customers":[' + '{' + '"Status":"Success",' + '"FirstName":"John",' + '"LastName":"Smith",' + '"Email":"[email protected]",' + '"Phone":"703.555.1212"' + '},' + '{' + '"Status":"Success",' + '"FirstName":"Jane",' + '"LastName":"Doe",' + '"Email":"[email protected]",' + '"Phone":"540.555.1212"' + '},' + '{' + '"Status":"Error",' + '"Message":"No Michael Johnson found."' + '}' + '],' + '"Count":2' + '}';
Jun 9, 2016 at 10:21 comment added Saroj Bera @Nick if you are creating a JSON String, you have to create the JSON structure. You can create like the one below.
Jun 9, 2016 at 10:15 comment added Nick @DougB: I expect the output to be JSON format, I do not have any object, but I will be storing the json string into one of my custom field
Jun 9, 2016 at 10:14 comment added Doug B @Nick you are converting a string into a string, what do you think it would look like?
Jun 9, 2016 at 10:13 comment added Nick @SarojBera: yes thats what I read but I'm not sure if it also Serializes string, my requirement is to convert that string into json format.
Jun 9, 2016 at 10:12 comment added Doug B What would you expect the output string to be? You can deserialize into an appropriate object structure if you define one.
Jun 9, 2016 at 10:12 comment added Saroj Bera What is your exact requirement? JSON.serialize method Serializes Apex objects into JSON content.
Jun 9, 2016 at 10:05 history asked Nick CC BY-SA 3.0