By Christine Dorffi on Sep 04, 2008
In mobile applications, developers typically rely on home-grown data-interchange formats or on the Extensible Markup Language (XML). The advantage of the former is that it can be tailored to particular situations for the purpose of maximizing performance and/or computational resources. The advantage of the latter, when used over HTTP, is that it is a de facto standard for data interchange. In addition, the text-based/human-readable representation used in XML makes it easier to debug.
Yet these two approaches also have disadvantages, one being proprietary in nature, non-standard, and potentially non-interoperable, while the other one could be considered too heavy and verbose for data representation, again this is especially true for mobile and embedded applications.
This article covers the following topics:
- JSON-Supported Data Types
- JSON on Java ME
- Using JSON
- The Core JSON JSONObject Class
- The Example DataTypes Class
- Serializing to JSON: Generating JSON Text
- Deserializing JSON: Initializing the Class from JSON Text
- Using the Serialization Methods