net.wanderinghorse.json  HomePage

Welcome!

This is the source code repository for the net.wanderinghorse.json Java API. It is a fork of the json.org API (which is also found in Android), created to fix a few minor annoyances and include some support for Java 6 Generics (the json.org developers want to support older JVMs). This code is maintained under the umbrella of the android.wanderinghorse.net project. This API is not dependent on Android, but Android is where i plan to do most of my Java coding for the foreseeable future, so this is where it is maintained.

Please see the download page for instructions on downloading this code.

Notable differences from the original API:

  • Has some support for Java 6 generics types.
  • Fixed a couple inconsistencies in the handling of null values.
  • JSONException is now an unchecked, instead of checked, exception. Usage in several projects showed that using checked exceptions (which require a try/catch block or a throws clause) over-complicates most client-side uses. Clients of course have the option of always try/catching JSONException, and are encouraged to do so when processing data which did not come from inside the current application (e.g. user-provided data, as opposed to persistent app-internal state).