Many web-based APIs return data in JSON format. MoSync doesn't come with an API for managing this data, but these classes can be used.
You have to create a JSONListener class, implementing events raised by the JSON processor. To start a JSON process, create a new instance of the JSONParser, and pass the JSON as a string.
String temp = "{\"glossary\": \"\"}"
JSONParser mJSONParser;
mJSONParser.addListener(this);
mJSONParser.parseString(temp);More examples are in this blog post http://www.mosync.com/blog/2010/03/working-json-data
| Attachment | Size |
|---|---|
| JSONParser.zip | 2.5 KB |