33Release notes:
44 - Java SE 7+, Android compatible;
55 - in accordance with RFC 8259: https://datatracker.ietf.org/doc/rfc8259/?include_text=1
6- - parser converts JSON to Java objects:
6+ - parser converts JSON text to Java objects:
77 JSON object, String, Number (BigDecimal), Boolean, null, Object[] array of listed types;
8- - JSON properties are stored in order of appearance/creation;
9- - JSON object property setter also acceps all Java primitives and primitive arrays ;
10- - in addition, generator converts Java Lists to JSON arrays [V[0],...,V[n]]
11- and Java Maps - to JSON objects {"K": V ,...}.
12- Null keys are converted to "null", unsupported objects are converted to strings .
8+ - JSON object members (name/value pairs) are stored in order of appearance/creation;
9+ - when the names within an object are not unique, parser stores the last name/value pair only ;
10+ - JSON object setter acceps types listed above, all Java primitives and primitive arrays;
11+ - in addition, generator converts Java Lists to JSON arrays [V[0] ,...,V[n]] and
12+ Java Maps - to JSON objects {"K": V,...} .
1313
1414Overview:
1515 static Object parse(String json) throws IOException, ParseException;
1616 static Object parse(Reader reader) throws IOException, ParseException;
17- static String stringify(Object object); // generate JSON
17+ static String stringify(Object object); // generate JSON text
1818
1919 Constructor:
2020 JSON();
2121
2222 Methods:
2323 String toString(); // stringify object
24- JSON clone() throws CloneNotSupportedException; // clones the property list only
25- List<String> list(); // list properties
26- boolean exists(String propertyName );
27- Object get(String propertyName );
28- JSON set(String propertyName , Object value) throws NullPointerException, IllegalArgumentException;
29- Object remove(String propertyName );
24+ JSON clone() throws CloneNotSupportedException; // clones the member list only
25+ List<String> list(); // list of member names
26+ boolean exists(String memberName );
27+ Object get(String memberName );
28+ JSON set(String memberName , Object value) throws NullPointerException, IllegalArgumentException;
29+ Object remove(String memberName );
3030
31- Usage example see in https://github.com/miktim/JSON/blob/master/test/JSONTest.java
31+ Usage example see in https://github.com/miktim/JSON/blob/master/test/JSONTest.java
0 commit comments