function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hai,
How can I get a JSONString to a list?
String a=JSONString;
create a class with an inner class.
the inner class holds the format of 1 item in your json
and the outer class contains a list of the inner class.
then, just use the JSON.deserialize(json, class.yourclass);
and you have a list
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_jsonparser.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_json.htm
Above will help you
List<String> result = (List<String>)JSON.deserialize('{"Item 1","Item 2","Item 3"}',List<String>.class);
create a class with an inner class.
the inner class holds the format of 1 item in your json
and the outer class contains a list of the inner class.
then, just use the JSON.deserialize(json, class.yourclass);
and you have a list
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_jsonparser.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_json.htm
Above will help you