JSON 4 Java 1.3


Download Lastest Release
Show license

JSON 4 Java is a simple JSON library for Java.


Changelog

  • New methods in JsonObject to avoid using JsonValue classes:

  • getObject, getArray, getBoolean, getNumber and getString

  • putBoolean, putNumber, putString

  • New methods in JsonArray for the same reason as JsonObject:

  • getObject, getArray, getBoolean, getNumber and getString

  • addBoolean, addNumber, addString (with and without the index argument)

  • JsonBoolean and JsonNumber constructors now take primitive types (boolean and double resp.) instead of wrapper types (Boolean and Double resp.)

  • JsonObject.getAs(): if a key has no mapping, the method will throw an exception instead of returning null to avoid confusion with an actual null JSON value.

  • JSON entities now have a getTypeName() method that returns the name of the corresponding JSON type.

  • JsonEntityType instances have this method too.

  • JSON parser

  • JSON writer

  • Java types for each JSON type