June 2015
Intermediate to advanced
192 pages
4h 8m
English
Java, like C++, predates JSON. Oracle is presently working on adding JSON support to Java, but in the meantime, several implementations providing JSON support are available on the Web. Similar to the C++ implementation you saw previously in this chapter, you can convert between JSON and Java using a third-party library; in this case, packaged as a Java archive (JAR) file, whose implementation typically represents JSON objects as a tree of named objects.
Perhaps the best Java implementation of JSON parsing is Gson, available from Google at http://code.google.com/p/google-gson/ licensed under the Apache License 2.0.
First, you'll need to get Gson; you can do this by doing a read-only checkout of the repository ...
Read now
Unlock full access