This is a JSON generation and parsing library for Java. It is oriented towards being used in web servers and includes several options for validation and controlling the way that the JSON is generated.
- Very fast encoding
- Recursive traversal of Maps, Iterables (Collection, List, Set etc.), Enumerations, arrays and ResourceBundles
- Data structure loop detection
- Reflection of objects is supported allowing lazy encoding of objects
- Property name validation (can use ECMAScript or JSON rules)
- Output to String or java.io.Writer
- JSON parsing to Java objects from Strings or java.io.Reader
- Options to fix certain types of bad data
- Automatic escaping of characters required to be escaped by the JSON standard.
- Several different escaping options
- Option to format dates on output and handle different formats when parsing
- ECMAScript 6 code point escapes are supported for reading and optionally for writing
- Supports Java 5, 6, 7 and 8.
- Options to support arbitrary precision numbers
- Most default configuration options can be set via JNDI (See the JSONConfigDefaults class)
- Most default configuration options can be read or modified via a JMX MBean client
- Option to format output for debugging.
Javadoc online (start with the JSONUtil class)
- Oct 05 - JSONUtil 1.10.4 released with change to default for undefined code points.
- Sep 26 - JSONUtil 1.10.2 released with better handling of bad character data.
- Sep 19 - JSONUtil 1.10.1 released with major speed enhancement for encoding strings that require escaping.
- Sep 14 - JSONUtil 1.10.0 released with major speed enhancements for encoding strings and numbers.
- Aug 17 - JMX MBean Wiki page updated with images
- Aug 15 - JSONUtil 1.9 released to support object reflection, arbitrary precision numbers and parsing to primitive arrays.