forked from fangyidong/json-simple
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathCHANGELOG
137 lines (119 loc) · 10.3 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
Version 4.0.1 (2022/03/*)
* Jsoner no longer escapes forward slashes (/) when serializing or pretty printing.
* Jsoner now adds a space ( ) after a colon (:) when pretty printing.
Version 4.0.0 (2021/07/*)
* Jflex plugin was upgraded from 1.4.3 to 1.8.2. This resulted in JsonException#getPosition() returning a long instead of an int. If you don't do position based JsonException handling this is backwards compatible with 3.* versions of this library. If you do position based JsonException handling, just change your position variables from int to long and your project will work as expected.
* Jflex removed %table as a code generation option and has been replaced with its default behavior %pack.
* Jsoner, JsonArray, and JsonObject now call methods that pass their writer. This avoids convenience calls that instantiate their own writer. Expect minor performance improvements for JSON with many fields.
* Removed deprecated method Jsoner.prettyPrint(String, int). Use Jsoner.prettyPrint(Reader, Writer, String, String) or Jsoner.prettyPrint(String) instead.
Version 3.1.1 (2020/02/*)
* JsonObject now has put methods that call JsonKey#getKey() on the given JsonKey as a convenience.
* JsonObject now has remove methods that call JsonKey#getKey() on the given JsonKey as a convenience.
* There are no such convenience methods for other methods in the Map API so it is important to remember the JsonObject is a Map<String, Object> not a Map<JsonKey, Object>.
* Note these changes were avoided in the past because it makes the API inconsistent. However, since they account for the vast majority of interactions with the API they do reduce verbosity of the code. They will also likely be a custom additions in many projects anyway and thus are included in the official release to maximize compatibility.
Version 3.1.0 (2019/03/*)
* Jsoner exposed its internal pretty print function to give the caller more control over how it indents and newlines. It also uses a Reader's input and pretty print to a Writer's output, such as for formatting a file.
* Jsoner#prettyPrint(String, int) deprecated in favor of the exposed function.
* Jsoner#prettyPrint(String) will be kept as a reasonable convenience method.
* JsonArray now has add methods that can be chained for inline instantiation.
* JsonObject now has put methods that can be chained for inline instantiation.
* Javadocs now correctly refer to RFC 7159.
Version 3.0.2 (2018/01/*)
* Bug fix: Serialization of primitive arrays no longer starts at the 2nd index with test cases.
* Bug fix: Character or primitive char is supported and with test cases.
* Chris (cbojar) was added to the list of Authors.
Version 3.0.1 (2018/01/*)
* Corrected javadocs.
Version 3.0.0 (2018/01/*)
* Removed all deprecated code: allowing development on case insensitive file systems.
* Refactored: code into a java package that matches the maven artifact group and id.
* Refactored: DeserializationException to JsonException.
Version 2.3.1 (2018/02/*)
* Bug fix: from 3.0.2 applied as a patch to 2.3.0 for the 2.3.1 release.
Version 2.3.0 (2017/10/*)
* Deprecated the feature in Jsoner that serializes Enums to fully qualified strings, the Enums should implement Jsonable instead.
* Deprecated getEnum and getEnumOrDefault methods in JsonArray and JsonObject.
* Deprecated get___(String) and get___OrDefault(String, ___) in favor of get___(JsonKey) and get___OrDefault(JsonKey) respectively.
* Enhancement: Added JsonKey interface to aid with code maintainability and convenience.
* Enhancement: Jsoner can mint a JsonKey.
* Enhancement: Jsoner deserialization no longer throws IOExceptions in favor of a DeserializationException with an IOEXCEPTION problem since the code to handle one is typically duplicated to handle the other.
Version 2.2.0 (2017/10/*)
* Bug fix: getEnum and getInteger and friends return null when the paired value is null to better match the java Map contract.
* Enhancement: Jsoner can prettyPrint with tabs or spaces.
Version 2.1.2 (2016/10/*)
* Bug fix: Jsoner#prettyPrint(printable) no longer quotes colons.
* Enhancement: for convenience a colon missing between a key value pair will officially continue to function as it has since the 1.* versions. Deserialization test cases have been updated.
Version 2.1.1 (2016/09/*)
* Separated the CHANGLOG and LICENSE from the README as they are recognized by tools like github. Most of the information in README is linked to on the project's website.
* Enhancement: JsonArray and JsonObject convenience gets are more flexible on their expected value. Booleans now allow Booleans or Strings. Numbers now allow Numbers or Strings. Strings now allow Booleans, Numbers, or Strings.
Version 2.1.0 (2016/09/*)
* Bug fix: JsonObject#getDefaultByte(key, defaultValue) now properly returns a byte value instead of a float.
* Enhancement: JsonObject has typed gets for each JSON value type.
* Enhancement: JsonArray and JsonObject no longer return primitives.
Version 2.0.0 (2016/09/*)
* Davin Loegering was added to the list of Authors.
* Consolidated the author list, change log, and license files from the base directory into the README.txt file.
* Removed ant build file.
* SCM section of the POM is updated with the github information since the svn repo urls were 404s.
* POM now defines the source at 1.7 instead of 1.2, and is the only cause for the major version increment. The 2.0.0 release of this library is otherwise 100% backwards compatible with the older versions.
* Minor code quality changes have been made to the old files of the project.
* JFlex plugin now included in POM.
* JFlex will produce a lexing class from all lex files in src/main/lex.
* Javadocs are now produced when the jar goal is executed.
* Moved lex files from doc/ to src/main/lex.
* Deprecated the old json.lex in favor of jsonstrict.lex.
* Deprecated ContentHandler and doesn't have a 2.0 equivalent.
* Deprecated ContainerFactory and doesn't have a 2.0 equivalent.
* Deprecated ItemList and doesn't have a 2.0 equivalent.
* Deprecated JSONParse and JSONValue in favor of Jsoner.
* Deprecated JSONStreamAware and JSONAware in favor of Jsonable.
* Deprecated JSONObject in favor of JsonObject.
* Deprecated JSONArray in favor of JsonArray.
* Deprecated org.json.simple.parser.ParseException for org.json.simple.DeserializationException.
* Deprecated org.json.simple.parser.Yytoken for org.json.simple.Yytoken.
* Deprecated org.json.simple.parser.Yylex for org.json.simple.Yylex.
* Tests for deprecated classes have been reorganized and updated to ensure backwards compatibility is maintained throughout the 2.x release lifetime.
* Classes that have been deprecated still have shoddy javadocs but were updated to not produce errors and warnings during the build process.
* Classes introduced in the 2.0 release have substantial javadocs to help projects heathily update ASAP.
* The Jsonable interface allows others to define how their objects should be serialized in JSON.
* DeserializationException has a new problem type for disallowed tokens.
* DeserializationException now recommends recovery actions based on the problem that caused the DeserializationException in its message. All recovery scenarios are basically the same so DeserializationException is still the only json-simple exception class.
* The new Yytoken types are renamed.
* The new Yytoken is robustly constructed only allowing a null value when it is a null value in the DATUM tokens.
* Jsoner can escape strings provided to it to help with implementing the Jsonable interface.
* Jsoner can pretty print JSON strings provided to it for logging and basic display purposes.
* Jsoner can serialize data defined in the RFC 4627 specification and objects that implement the Jsonable interface. If data could be serialized multiple ways the deepest Jsonable implementation in the heiarchy is preferred. Any defined Jsonable implementation will be preferred before falling back to a default serialization.
* Jsoner can serialize an Enum that doesn't implement Jsonable.
* Jsoner will deserialize any numerical value as a BigDecimal.
* Jsoner can deserialize JsonArrays, JsonObjects, Strings, Numbers, Booleans, and null from strings provided to it.
* Jsoner can deserialize a JsonArray and exception out if any other value would be returned.
* Jsoner can deserialize a JsonObject and exception out if any other value would be returned.
* Jsoner can deserialize multiple JsonArrays, JsonObjects, Strings, Numbers, Booleans, and nulls from a single string provided to it.
* Jsoner deserialization (parsing) is thread safe.
* JsonArray is based on ArrayList<Object>. So it won't produce code warnings and can be used to construct a more convenient Collection.
* JsonArrays that are homogeneous can be cast and copied into a provided collection of the homogenous type.
* JsonArray contains gets for each allowed data type in JSON and convenience methods for Collections, Enums, and Maps. Note that they will throw ClassCastExceptions in such cases since it is still indictitive of a programmer's error.
* JsonObject is based on HashMap<String, Object>.
* JsonObject contains getTypeOrDefault for each allowed data type in JSON and convenience methods for Collections, Enums, and Maps. Note that they will throw ClassCastExceptions in such cases since it is still indictitive of a programmer's error.
Version 1.1.1 (2012/01/29)
* Supports OSGi
* Accepts a java.util.Map parameter in constructor of JSONObject
Version 1.1 (2009/01/23)
* Supports stoppable SAX-like content handler for streaming of JSON text
* Added JSONStreamAware to support streaming JSON text
* Added ContainerFactory to support creating arbitrary Map and List as JSON object and JSON array container during decoding
* Supports any Map and List as JSON object and JSON array container during encoding
* Added interface JSONAware
* Added ParseException to get detail error report while parsing
* Added escaping for Unicode characters that cause problems for browser JS eval
Version 1.02 (2009/01/10)
* Updated json.lex to improve performance of the lexer
* Removed Rope.java and related junit test
Version 1.01 (2008/08/26)
* License changed to a more commerce friendly and clear one, Apache License 2.0
* Use JFlex to generate a faster Yylex.java
* Added Rope.java to get faster string operations
* Separate test codes from source codes
* Added ant build file build.xml
Version 1.0 (2006/04/15)
* Initial version