Commit Graph
19 Commits
Author SHA1 Message Date
John J. Aylward 91107e3e82 Adds support to JSONObject wrap and write methods to explicitly handle Enums.
The new way enums are handled is to always place the actual enum in the
JSONObject/JSONArray. When writing, we always write the actual "name"
of the enum, so even with a toString override on the enum class, the
value remains consistant and compatible with the optEnum/getEnum methods.

The constructor JSONObject(Object) functions the same way as before when
passing an enum and is consistent with other "value" types. For example,
when creating a JSONObject with Long, Boolean, BigDecimal as the constructor
parameter, the value will be treated as a "bean".
2016-08-11 12:22:31 -04:00
John J. Aylward 09d37e59b8 Cleans up the JSONML changes and adds similar changes to the XML class 2016-07-18 14:42:21 -04:00
John J. Aylward 93704371bb Updates to the Javadoc for exceptions 2016-07-18 14:12:06 -04:00
John J. Aylward 42791ab12d Updates README to note that the parser does allow some invalid JSON 2016-06-16 13:01:22 -04:00
John J. Aylward c2b3f2bdb1 adds back in the XML.stringToValue method, but deprecates it. 2016-01-27 15:21:11 -05:00
John J. Aylward 3007fc8ebe Removes custom XML stringToValue method in favor of keeping a consistent
implementation in JSONObject
2016-01-27 15:03:19 -05:00
John J. Aylward 39b1c0cb66 fixes error in -0 check 2016-01-27 10:45:23 -05:00
John J. Aylward 07b2d65e30 Fixes #187 -0 now returns as a double. 2016-01-27 10:39:31 -05:00
John J. Aylward 5b67330b71 Merge branch 'master' of https://github.com/douglascrockford/JSON-java 2016-01-27 09:53:03 -05:00
John J. Aylward 48302592cf Merge branch 'master' of https://github.com/douglascrockford/JSON-java 2015-12-09 10:07:36 -05:00
John J. Aylward ec8f649467 Merge branch 'master' of https://github.com/douglascrockford/JSON-java 2015-12-08 09:27:54 -05:00
John J. Aylward 105426b53f Formatting 2015-10-26 18:35:40 -04:00
John J. Aylward 7886c96204 Changes JSONArray for loops to use the new iterators. 2015-10-26 18:30:41 -04:00
John J. Aylward 91c6f09be8 Modifies XML output to be handled the same for a native java array as well as a JSONArray. 2015-10-26 18:17:37 -04:00
John J. Aylward 1b06a802cf makes params final 2015-10-12 14:54:30 -04:00
John J. Aylward 0e13241528 Expands javadoc 2015-10-12 14:53:03 -04:00
John J. Aylward e239e1967a Allows a custom message to be passed with a cause. 2015-10-12 14:52:17 -04:00
John J. Aylward ceba8e8c3d Fixes possible NPE 2015-10-12 14:25:18 -04:00
John J. Aylward 4e77383472 Properly overrides the Exception class. 2015-10-12 14:23:05 -04:00