1
0
Fork 0
mirror of https://github.com/ethauvin/JSON-java.git synced 2025-06-17 07:50:52 -07:00
Commit graph

790 commits

Author SHA1 Message Date
John J. Aylward
bbd3fd5571 Adds tests for numbers 2016-08-16 20:52:41 -04:00
John J. Aylward
349a209df3 Merge remote-tracking branch 'upstream/master' into EnumCleanup 2016-08-15 10:25:27 -04:00
John J. Aylward
7851e9b2e8 revert back changes to Number support 2016-08-15 10:24:38 -04:00
Sean Leary
7232a95c0b Update JSONObject.java
Fixed some typos committed in #249, since reverted, tracking issue is #263
2016-08-15 01:58:54 -05:00
Sean Leary
f96f505188 Update JSONArray.java
Fixed a Javadoc typo, originally fixed in #249, since reverted. This is to address issue #263
2016-08-15 01:53:08 -05:00
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
5779400f26 test updates to make sure Enums are handled consistently. 2016-08-11 12:21:49 -04:00
Sean Leary
c400de3cfe Merge pull request #53 from run2000/master
valueToString() and write() tests
2016-08-10 21:55:33 -05:00
Sean Leary
4e8e24d49d Merge pull request #259 from run2000/appendable_v2
JSONWriter uses Appendable (v2)
2016-08-10 21:55:10 -05:00
Sean Leary
f881b61c81 Update XML.java
Removed a problematic JavaDoc in the header comment to a deprecated method
2016-08-10 15:35:26 -05:00
Sean Leary
37582a44ad Update README 2016-08-10 09:13:22 -05:00
Sean Leary
a418d07460 Merge pull request #55 from johnjaylward/verifyOptMissingKeys
Updates tests to include all opt methods and verify for missing keys.
2016-08-10 09:04:27 -05:00
Sean Leary
154cfda9aa Merge pull request #261 from stleary/revert-249-master
Revert "reduces the use of unnecessary exceptions"
2016-08-10 09:03:57 -05:00
John J. Aylward
8bae09f81b removes unnecessary comparison to true 2016-08-09 16:11:46 -04:00
John J. Aylward
80e36eb63c Fixes error messages 2016-08-09 15:59:27 -04:00
John J. Aylward
a2c311527b Updates tests to include all opt methods and verify for missing keys. 2016-08-09 15:54:06 -04:00
Sean Leary
45a7decba4 Revert "reduces the use of unnecessary exceptions" 2016-08-09 14:22:06 -05:00
Nicholas Cull
0c157cae75 JSONWriter uses Appendable. 2016-08-08 19:40:10 +10:00
Sean Leary
8e079599c4 Update README 2016-08-07 15:19:44 -05:00
Sean Leary
62524b531d Merge pull request #52 from johnjaylward/OptionalTypeConversion
updates Test cases to support new JSONML and XML conversion options
2016-07-31 21:09:34 -05:00
Sean Leary
3080b8beeb Merge pull request #253 from johnjaylward/OptionalTypeConversion
Optional type conversion for XML reading
2016-07-31 21:09:07 -05:00
Sean Leary
2c228ecf1a Merge pull request #249 from Simulant87/master
reduces the use of unnecessary exceptions
2016-07-26 23:04:49 -05:00
run2000
e57881f8fa Fail when exceptions are not thrown as expected
The idiom was started in the first few methods, but not continued further down where JSONException was expected. False success may have resulted.
2016-07-25 09:44:43 +10:00
Nicholas Cull
efe33a1e37 Fix comment. 2016-07-24 19:57:01 +10:00
Nicholas Cull
1246e12827 Factor out Writer from Appendable tests. 2016-07-24 19:39:52 +10:00
Nicholas Cull
ffcfa66d77 Add JSONString test class.
This set of tests demonstrates what happens when JSONString returns various results from its toJSONString() method. Tests for null returns and exceptions thrown. Also tests what happens for non-JSONString objects. The intent is to cover JSONObject's valueToString() and writeValue() methods.
2016-07-24 18:56:08 +10:00
Sean Leary
5d8ea6fa4e Update README.md 2016-07-23 10:13:21 -05:00
Sean Leary
cdfdaba95b Update README.md 2016-07-23 10:12:33 -05:00
Sean Leary
2307f6f85e Update README.md 2016-07-23 10:12:04 -05:00
Sean Leary
6b4edbd40c Update README.md 2016-07-23 10:02:19 -05:00
Nicholas Cull
ae77b5cd83 Tests for deep copy and mutability of toList() and toMap().
Both toMap() and toList() return deep copies, which are also mutable. That is, any changes to the JSONObject or JSONArray do not affect the newly create Map or List, and vice-versa. The resulting objects can be altered.
2016-07-23 22:51:50 +10:00
Nicholas Cull
72c2b911bf Tests for toString(), write(), toList(), and toMap().
Explicitly test variations of toString() and write() for different indent levels, and different method overloads. Also create some tests for the new toList() and toMap() methods for coverage improvements to JSONArray and JSONObject.
2016-07-23 22:33:19 +10:00
Nicholas Cull
c3ba4bdbe5 Nesting depth test works as expected. 2016-07-23 19:12:51 +10:00
Nils Faupel
3890bfae52 reduce the use of unnecessary exceptions 2016-07-19 19:59:30 +02:00
Nils Faupel
abf2963bbe Revert "reduces the use of unnecessary exceptions"
This reverts commit 7627d40d10.
2016-07-19 19:00:42 +02:00
John J. Aylward
215321cd28 updates Test cases to support new JSONML and XML conversion options 2016-07-18 15:04:03 -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
Jakob Stemberger
42e0944708 Brings in changes from PR #70 to be updated to HEAD 2016-07-18 13:45:31 -04:00
Sean Leary
71c1eba1e7 Merge pull request #51 from johnjaylward/VerifyOptConversions
Verify opt method conversions for JSONArray and JSONObject
2016-07-08 22:31:48 -05:00
John J. Aylward
c2de224711 Verify opt method conversions for JSONArray and JSONObject 2016-07-08 16:58:58 -04:00
Simulant
7627d40d10 reduces the use of unnecessary exceptions 2016-07-08 22:17:05 +02:00
Sean Leary
04181fb6e2 Merge pull request #246 from johnjaylward/LicenseFile
Add License file
2016-07-02 13:20:54 -05:00
Sean Leary
239e0b7070 Merge pull request #242 from johnjaylward/issue240
Fixes Issue #240
2016-07-02 13:20:21 -05:00
johnjaylward
a8a71898a3 Create LICENSE 2016-06-22 14:49:52 -04:00
johnjaylward
86e8f7b313 Update README
fixes typo
2016-06-17 16:39:11 -04:00
Sean Leary
01af31718e Merge pull request #50 from johnjaylward/issue240
Tests for Issue #240 in JSON-Java
2016-06-17 09:36:42 -05:00
John J. Aylward
1204ea9dcf fixes a typo 2016-06-17 00:04:27 -04:00
John J. Aylward
c5deff636b updates README for new project layout 2016-06-16 23:59:34 -04:00
John J. Aylward
46a1c9acf9 Adds test case to confirm the parsing of control characters 2016-06-16 13:02:08 -04:00