Using JavaScript Object Notation (JSON) in Java ME for Data Interchange

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.

An alternative to consider is JSON, a lightweight data-interchange format. JSON is defined as part of JavaScript (ECMAScript) scripting language. Being native to JavaScript, JSON is ideal for browser-based applications. But JSON is not limited to JavaScript, and its lightweight characteristics make it very attractive for mobile and embedded applications in general.

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

Read the full article

Comments:

I WOULD LIKE TO KNOW THAT IS WHY MY YAHOO SCRIPT NOT WORKING,I CAN WRITE A MESSAGES BUT IT WONT SHOW UP ON THE MESSAGES WINDOW

Posted by ANNETTE SIMPKINS on October 15, 2008 at 10:14 AM PDT #

ANNETTE -

I don't understand the question, what script? what message to where? what window?

ceo

Posted by C. Enrique Ortiz on October 15, 2008 at 01:13 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Tips for developers who use Java technologies (Java SE, Java ME, JavaFX) for mobile and embedded devices.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today