function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kam.ax1015Kam.ax1015 

json utility classes

Hello,

 

To parse and construct json within the server side REST controllers, are there any json utility classes? Something like flex json in Java world..

 

Thanks,

Kam

Best Answer chosen by Admin (Salesforce Developers) 
dkadordkador

You want to parse JSON in Apex, right?  See the following blog post, it will probably help:

 

http://blog.jeffdouglas.com/2010/01/06/calling-a-json-rest-web-service-with-apex/

 

Watch out for the number of statements governor limit when using this JSON library.

All Answers

cloudcodercloudcoder

Try the following. There are plenty more, but I have had success with these

 

Ruby

HTTParty - http://httparty.rubyforge.org/

 

Java

JSONLib - http://json-lib.sourceforge.net/ or Gson - http://code.google.com/p/google-gson/

 

Objective C

JBSon - https://github.com/stig/json-framework/

 

 

dkadordkador

You want to parse JSON in Apex, right?  See the following blog post, it will probably help:

 

http://blog.jeffdouglas.com/2010/01/06/calling-a-json-rest-web-service-with-apex/

 

Watch out for the number of statements governor limit when using this JSON library.

This was selected as the best answer
Kam.ax1015Kam.ax1015

Yes. Thanks a lot.