Robert Lichtenberger
1afd7cd6bc
Use better name for parser configuration option, fix API comment.
2025-03-21 07:25:37 +01:00
Robert Lichtenberger
5d1c789490
Add test for JSONArray from Java collection.
2025-03-19 08:10:33 +01:00
marilynel
3919abd69a
optimized unit tests to respond accurately to default strictMode
2025-02-15 12:30:12 -08:00
Simulant
6631b80e8f
#947 add new failing tests with JSONTokener having strict mode configuration
2025-01-15 21:38:46 +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
d3c7eaf17e
restore-jsonparserconfiguration: fix unit tests to work when strictMode default is true
2024-12-15 13:18:39 -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
ab1b9a3459
Revert "Merge pull request #888 from rikkarth/fix/887"
...
This reverts commit 14f71274f79ac50afb316845539f4195facc33ee, reversing
changes made to 054786e300d0fc38f0cf7fc0f2db4d9b39cb6443.
2024-11-03 09:49:23 -06:00
Lucas Nascimento
0d71dcf713
test( #901 ): call JsonArray.putAll with a casted list as object
2024-10-05 11:39:26 -03:00
Sean Leary
6529a7e536
fixes the broken JSONArrayTest cases
2024-04-28 10:45:23 -05: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
Sean Leary
19dec1bb5f
Fixing JSONArrayTest testRecursiveDepthArrayFor1000Levels()
2024-02-02 13:11:37 -06:00
sk02241994
ffd48afa42
Review comments
2023-12-23 10:53:54 +05:30
sk02241994
abea194120
Adding JSONParserConfiguration for configuring the depth of nested maps
2023-12-22 15:47:55 +05:30
sk02241994
dcac3bc18e
Adding test case for nested json with depth of 999, 1000, 1001
2023-12-22 15:47:54 +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
John J. Aylward
a3742acf74
Fixes #821
...
add ignore annotation to tests that may fail due to differences in machine resources and can't be controlled via the tests
2023-11-06 17:54:09 -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
Sean Leary
ef68cdf810
Merge pull request #773 from eedijs/master
...
Add optJSONArray method to JSONObject with a default value
2023-09-30 11:47:01 -05:00
Éamonn McManus
eaa5611ba3
Merge branch 'stleary:master' into complexkey
2023-09-28 11:33:08 -07:00
Éamonn McManus
dbb113176b
Add more test cases for unquoted text in objects and arrays.
2023-09-28 11:05:50 -07:00
Edijs
284a316838
Add optJSONArray and optJSONObject methods to JSONArray with a default value
2023-09-27 19:30:45 +03:00
Éamonn McManus
3e688afc66
Small test fixes.
...
One test method was missing `@Test` so it was never run.
One test method used another test class as the base for finding a test
resource. While this works in practice with Maven, it is not strictly
right.
2023-09-19 07:38:13 -07:00
Valentyn Kolesnikov
74cd73f97c
Addressed compile warnings
2023-09-08 07:34:00 +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
Cleydyr de Albuquerque
eb56704e68
fix: set default maximum nesting depth as 512
2023-02-02 18:15:03 +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
beae279b21
Updates tests to have updated message expectations
2022-03-21 13:06:19 -04:00
John J. Aylward
7a124d857d
Add test cases for invalid input
2022-01-26 12:19:53 -05: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
efad1d73a7
Added UnitTests
...
(I hope they works :c)
2020-12-04 04:09:19 +01:00
John J. Aylward
f37c2d67c5
Update for JSONArray.putAll methods
...
* Adds a copy constructor for JSONArray
* Updates the JSONArray.addAll(Object) method to be more lenient
* Adds support for JSONArray.putAll of generic Iterables
* Adds support for JSONArray.putAll of another JSONArray
2020-07-30 10:10:06 -04:00
Sean Leary
870fa03a19
Merge pull request #529 from ethauvin/master
...
Added putAll(Collection) and putAll(Array) methods.
2020-07-25 12:45:44 -05:00
Sean Leary
78528102d0
Merge pull request #543 from johnjaylward/RefactorXmlConfiguration
...
Refactor XMLConfiguration to use Builder Pattern
2020-07-24 02:49:28 -05:00
Erik C. Thauvin
0d13e56064
Added tests for consecutive calls to putAll.
2020-07-21 23:09:28 -07:00
John J. Aylward
5a31f9ef5f
Refs #541
...
Updates XML configuration to use a builder pattern instead of
constructors with many parameters
2020-07-21 11:08:40 -04:00
stleary
c63e78bbc7
initial commit
2020-07-18 17:14:39 -05:00
vivek
d088cf014e
Development for stleary#516 completed with rebased repository
...
- Introduced JSONObject(int) constructor.
- int > Initial capacity of the underlying data structure
- Test for new introduced JSONArray(int) constructor.
1. Checked with input parameter: 0
2. Checked with input parameter: positive number
3. Checked with positive number input parameter and compared length
4. If input parameter is negative number JSONException is thrown:
JSONArray initial capacity cannot be negative.
2020-06-03 11:46:48 +02: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
John J. Aylward
fb01575394
Test cases updates for standardized exception messages
2019-09-17 10:47:16 -04:00
John J. Aylward
3e6c0a51bd
update expected exception text in tests to match unified number getters
2018-10-04 16:02:50 -04:00
Andrei Paikin
d00501eabd
add usage of isEmpty method
2018-05-25 22:47:05 +03:00
John J. Aylward
dae88d7c5c
fix method names
2017-11-06 10:35:49 -05:00
John J. Aylward
08d93f3eb5
test cases for issue https://github.com/stleary/JSON-java/issues/379
2017-11-06 10:27:45 -05:00