Commit Graph

64 Commits

Author SHA1 Message Date
marilynel
05867c4b0b Merge branch 'master' of https://github.com/marilynel/JSON-java 2025-09-21 16:37:20 -08:00
marilynel
c6efa080c0 more cleanup sonarqube JSONArray 2025-09-21 16:36:52 -08:00
Michele Vivoda
9de3005566 Update JSONArray.java for #1007
fix array content starting with ',' in strict mode
2025-09-10 02:21:16 +02:00
AlexCai2019
e800cc349f Use constant.equals()
There are some equals() that are not constant.equals(variable), but variable.equals(constant)
2025-06-05 02:15:49 +08:00
Simulant
4c873a1db4 #947 use JSONParserConfiguration of JSONTokener in JSONObject and JSONArray constructor 2025-01-15 21:41:01 +01:00
Michael Ameri
ca1c6830c9 remove field references to JSONTokener and JSONParserConfiguration in JSONArray
and JSONObject
2025-01-10 18:05:27 +01:00
Sean Leary
2dcef89a6f Code review action items - add comments and consistent error messages for strict mode 2024-12-21 09:50:52 -06:00
Sean Leary
1f0729cadb restore-jsonparserconfiguration: strict mode initial attempt. Still missing all JSONObject test cases and strict mode sanity check. Might be able to simplify implementation a bit more 2024-12-14 14:40:40 -06:00
Sean Leary
80b2672f77 restore-jsonparserconfiguration: clean up some whitespace 2024-12-14 10:07:26 -06:00
Sean Leary
1f308db7c4 restore-jsonparserconfiguration: Restore methods to be used for strict mode 2024-12-14 10:01:27 -06:00
Sean Leary
2ee5bf13f4 Merge pull request #907 from hexetia/fix-901
Fix a bug when calling JSONArray.addAll() with Collection as Object
2024-11-13 16:29:34 -06:00
Sean Leary
215ec9bb9c Revert "Merge pull request #877 from rikkarth/feat/871-strictMode"
This reverts commit d02ac0f2a3, reversing
changes made to cfd47615d0.
2024-11-03 09:50:08 -06:00
Sean Leary
ab1b9a3459 Revert "Merge pull request #888 from rikkarth/fix/887"
This reverts commit 14f71274f7, reversing
changes made to 054786e300.
2024-11-03 09:49:23 -06:00
Lucas Nascimento
14e9cdc485 fix(#901): add the jsonparserConfiguration param to avoid a stackoverflow error 2024-10-05 11:43:00 -03:00
rikkarth
1ae43bdb90 fix(#887): regressions, unit tests
- JSONArray now evaluates EOF accordingly for empty Array inputs.
- JSONTokener fixed indentation
- externalized two JSONMLTest cases
2024-04-28 23:30:05 +01:00
rikkarth
1e3f37be98 feat(#877): add additional validation, test case 2024-04-27 22:37:21 +01:00
rikkarth
9216a19366 feat(#877): improved JSONArray and JSONTokener logic
JSONArray construction improved to recursive validation
JSONTokener implemented smallCharMemory and array level for improved validation
Added new test cases and minor test case adaption
2024-04-27 22:14:35 +01:00
rikkarth
0bace72ced fix(#887): small typo 2024-04-21 22:09:05 +01:00
rikkarth
3dcd5b2fab fix(#887): double array breaking JSONTokener.nextValue
change(#887): input validation
2024-04-21 11:03:15 +01:00
rikkarth
ce074e9f9a fix(#887): corrected small typo 2024-04-14 23:23:06 +01:00
rikkarth
fe597d296e fix(#887): complete strictMode for JSONArray 2024-04-14 23:11:17 +01:00
rikkarth
c0918c2428 feat(#871-strictMode): add allowSingleQuote option, add enhancements and simplification 2024-03-30 11:06:30 +00:00
rikkarth
8f66865e0a Merge branch 'master' into feat/871-strictMode 2024-03-21 08:08:15 +00:00
Simulant87
6aed1cfeb6 fix typo 2024-03-18 23:07:22 +01:00
rikkarth
3672b5e158 chore(#871-strictMode): reverted unrelated changes 2024-03-17 15:20:38 +00:00
rikkarth
c51efe8b08 docs(#871-strictMode): JSONArray constructor JavaDoc update 2024-03-15 22:55:09 +00:00
rikkarth
e67abb3842 feat(#871-strictMode): improved validation, strict mode for quotes implementation 2024-03-15 22:28:31 +00:00
rikkarth
63e8314deb feat(#871-strictMode): strictMode JSONArray initial implementation
test(#871-strictMode): initial test implementation
2024-03-15 00:45:32 +00:00
Simulant
5974fc1a38 Merge branch 'master' into 863-improve-toString-performance-StringBuilderWriter 2024-03-10 21:10:21 +01:00
Simulant
06778bd2d9 #863 compute initial capacity for StringBuilderWriter 2024-02-24 21:21:06 +01:00
Sean Leary
771c82c4eb backing out recent changes to optLong, getLong. See #868 2024-02-24 13:07:51 -06:00
Simulant
7c7a98da71 #863 use StringBuilderWriter to toString methods
resulting in a faster toString generation.
2024-02-23 21:48:25 +01:00
Sean Leary
5ddb8c3d35 cleanup-and-merge-tests: fix warnings, set gradlew permissions, enable unchecked warnings in maven 2023-12-30 16:30:19 -06:00
sk02241994
7701f21839 Adding comments 2023-12-24 11:39:26 +05:30
sk02241994
abea194120 Adding JSONParserConfiguration for configuring the depth of nested maps 2023-12-22 15:47:55 +05:30
sk02241994
6d811607dd Resolving issue #743
- Recursive depth issue found in JSONObject
- Recursive depth issue found in JSONArray
2023-12-22 15:47:54 +05:30
rudrajyoti biswas
98b79ae7bf #813 - moved number conversion related common changes to utility static method. 2023-10-23 19:16:25 +05:30
rudrajyoti biswas
1d0775cce7 Revert changes with feature and refactor together. 2023-10-19 10:28:11 +05:30
rudrajyoti biswas
7b2677ac5a #790 - Update XML with changes for string to number conversion.
Moved the code logic to a common utility to de-duplicate.
2023-10-14 10:05:36 +05:30
Grzegorz Olędzki
61bb60e752 Removing excessive synchronization 2023-09-30 21:36:11 +02:00
Edijs
284a316838 Add optJSONArray and optJSONObject methods to JSONArray with a default value 2023-09-27 19:30:45 +03: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
stleary
89f6e7f6a6 Merge branch 'master' into update-copyright 2022-08-26 20:59:00 -05:00
stleary
6daabb43ab update-copyright - Replace copyright and license restrictions with Public Domain 2022-08-23 20:00:25 -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
Liam Miller-Cushon
8ca8a80753 Fix some typos 2021-08-25 13:56:44 -07:00
stleary
c6089e53f5 Fixes Issue #611 JsonArray.similar() returns after number entry check 2021-07-18 19:53:23 -05:00
Ian Lovejoy
75894086e5 Fixed incorrect cast getting float from array
Added test for getting float from array
2021-04-27 19:03:35 -07:00
Stranck
c7130d577a Oops 2020-12-04 01:09:18 +01:00