43 Commits

Author SHA1 Message Date
rudrajyoti biswas
56cb5f84c4 #653 - review comments updated. 2023-10-12 11:03:13 +05:30
rudrajyoti biswas
0cdc38ac24 #653 - review comments updated. 2023-10-12 00:53:36 +05:30
Rudrajyoti Biswas
d5277b126b
Merge branch 'stleary:master' into master 2023-10-11 19:17:21 +00:00
Madjosz
c93014cb53 add validity check for JSONObject constructors
* fixes #713
* document JSONException in JavaDoc
* remove unused Comparable<T> boundary to reuse GenericBean in test
2023-10-07 09:38:54 +02:00
rudrajyoti biswas
1a38879c90 #653 - optLong vs getLong inconsistencies
For exponential decimal conversion, number is not touched.
Leading zeros removed from numeric number strings before converting to number.
2023-10-06 21:34:00 +05:30
Sean Leary
79af389f7a
Merge pull request #774 from mccartney/removing-synchronized
Removing excessive synchronization
2023-10-04 07:40:10 -05:00
Sean Leary
beb2fb5706
Merge pull request #772 from eamonnmcmanus/complexkey
Disallow nested objects and arrays as keys in objects.
2023-10-01 11:04:40 -05:00
Grzegorz Olędzki
61bb60e752 Removing excessive synchronization 2023-09-30 21:36:11 +02:00
Edijs
db0fde2a56 Add optJSONArray method to JSONObject with a default value 2023-09-25 20:31:58 +03:00
Éamonn McManus
661114c50d Generalize the logic to disallow nested objects and arrays as keys in objects.
Fixes #771.
2023-09-20 10:50:48 -07:00
Éamonn McManus
2a4bc3420a Apply simplification suggested by @johnjaylward. 2023-08-01 14:38:45 -07:00
Éamonn McManus
c8a9e15a57 Don't skip past \0 when parsing JSON objects.
A better solution might be to use -1 instead 0 to represent EOF everywhere,
which of course means changing `char` variables to `int`. The solution here is
enough to solve the immediate problem, though.

Fixes #758.
2023-08-01 13:11:25 -07:00
dburbrid
4951ec48c8 Renamed object methods from ...Obj to ...Object.
Added object method for optDoubleObject (returns Double vice double).
Added similar methods in JSONArray.
Added test methods.
2023-06-29 09:39:34 +01:00
João Farias
0d436d92e2
Removing commented out code 2023-03-02 16:39:11 +01:00
stleary
89f6e7f6a6 Merge branch 'master' into update-copyright 2022-08-26 20:59:00 -05:00
Sean Leary
346fb26f2d
Merge pull request #683 from spaffrath/Issue_682_JSONString_similarity
Issue 682 JSONString similarity
2022-08-26 20:57:22 -05:00
stleary
6daabb43ab update-copyright - Replace copyright and license restrictions with Public Domain 2022-08-23 20:00:25 -05:00
stleary
e0534b3ec7 initial attempt to test for inconsistent map types in JSONObject 2022-08-20 16:14:34 -05:00
Scott Paffrath
89f16ad0af Issue 682 JSONString similarity 2022-08-05 11:00:33 -07:00
John J. Aylward
a642329314 Updates value error messages to be consistent.
Provide both the type and value that failed conversion. Tries not to
"toString" large value types like Arrays or Maps. For those types it
will just output the type and not a value.
2022-03-21 12:48:25 -04:00
John J. Aylward
7a124d857d Add test cases for invalid input 2022-01-26 12:19:53 -05:00
Liam Miller-Cushon
812955e39d Use IdentityHashSet for cycle detection
Fixes https://github.com/stleary/JSON-java/issues/650
2021-11-26 20:07:21 -05:00
Zach
1ffcf3915c successful test 2021-11-17 19:35:53 -06:00
Zach
b5bcb68968 added set check logic 2021-11-17 16:57:41 -06:00
Zach
7823d3a4f3 locate the pace for cyclic check 2021-11-17 15:28:01 -06:00
Liam Miller-Cushon
8ca8a80753 Fix some typos 2021-08-25 13:56:44 -07:00
Sean Leary
fb71d9d40f
Merge pull request #606 from artem-smotrakov/fix-javadoc
Fix javadoc
2021-08-17 20:40:04 -05:00
stleary
2559114dbb Merge branch 'master' into fix-similar-check 2021-07-26 17:53:20 -05:00
John Aylward
579784d73e correct error in converting doubles to big decimals 2021-07-22 23:46:31 -04:00
John Aylward
4e0faebe62 fix javadoc errors that prevent compilation in Eclipse 2021-07-22 22:54:46 -04:00
stleary
cfbc306673 Fixes Issue #611 JsonObject.similar() returns after number entry check 2021-07-18 10:32:49 -05:00
Niels Frederiksen
f91d0c8a52 New JSONObject.optJSONObject method with defaultValue parameter 2021-06-23 15:15:00 +02:00
Artem Smotrakov
b48abe6558
Suppress java/unchecked-cast-in-equals warning for JSONObject.Null.equals() 2021-05-31 15:00:29 +02:00
Artem Smotrakov
97023e1098
Fix Javadoc formatting in JSONObject and XMLParserConfiguration 2021-05-31 14:53:59 +02:00
Ehtesham
5b531faa49 Improved the logic for checking the length of key 2021-01-28 15:31:23 +05:30
Ehtesham
31ff8a2291 Checked the length of key for checker framework 2021-01-27 11:35:38 +05:30
Stranck
c7130d577a Oops 2020-12-04 01:09:18 +01:00
Stranck
57ad94ef5e Added clear() methods to JSONObject and JSONArray 2020-12-04 00:49:21 +01:00
John J. Aylward
68883b9ff8 update number handling to use new helper method for consistency. 2020-11-19 19:10:08 -05:00
John J. Aylward
11e6b1af7e fixes issue #573 by added specific compare of numeric types 2020-11-19 18:55:49 -05:00
John J. Aylward
56d33b8061 changes number parsing to use BigDecimal as the backing type
* updated tests to support BigDecimal as the backing type for numbers
* updated some test resource handling to java7 try-with-resources format
* cleaned up some other minor compiler warnings
2020-05-26 10:10:36 -04:00
stleary
2b0a8838ef gradle support 2020-05-22 11:17:44 -05:00
Benjamin Gehrels
74e4932cfc Transform the repository into standard maven format and merge the pom.xml of the release repo 2020-04-29 19:24:44 +02:00