05 Sep

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

I recently wrote an article on using JSON on mobile Java applications. From the article:

Choosing the right data interchange format is an important design decision when building any network-aware software. This is especially true when designing mobile and embedded applications, where attributes such as lightweight and efficient are important characteristics to consider. Such characteristics are important because they translate to lower computation requirements and use of power, potentially better performance, and lower costs of operation.

See Using JavaScript Object Notation (JSON) in Java ME for Data Interchange (Sun Developer Mobility website).

ceo

3 thoughts on “Using JavaScript Object Notation (JSON) in Java ME for Data Interchange

  1. In my experience the org.json.me library is overengineered and a burden on many memory constrained J2ME devices. Instead I went with Stringtree JSON, modifying it to use J2ME collections instead of Java 1.2+ ones:

    http://www.stringtree.org/stringtree-json.html

    The reader is just 300 LOCs and fits in a single class. Most importantly it maps all the JSON data types into existing core J2ME classes, leaving no need for boxing everything like o.j.me does. They also offer a single class writer, but StringBuffer and the built-in Java string conversions were more than enough.

  2. Very good, thanks for the info! Agree that only a few classes of json.org are needed (the core ones I make use of/reference in the article). I will take a look at the above URL.

    ceo

Comments are closed.