O'Reilly logo

Pro Android Media: Developing Graphics, Music, Video, and Rich Media Apps for Smartphones and Tablets by Shawn Van Every

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JSON

JSON stands for JavaScript Object Notation. While originally designed for use in JavaScript, as a data-interchange format, it is language-independent. Additionally, for a variety of reasons, one being that it is relatively easy to implement, many web services offer it as an alternative to other formats that are based on XML for data transmission. It is also more lightweight, more compact, and easier for machines to parse than XML.

Android is bundled with a JSON parser within the org.json package.

We won't get too far into the exact syntax of JSON data, but here is a prototypical JSON object representation.

{"result":{"aname":"value", "anumber":1234, "aboolean":false}}

As you can see in the JSON representation, the entire representation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required