Sean Leary
c4cd526c53
Merge pull request #779 from Madjosz/713_jsonobject_nonfinite
...
add validity check for JSONObject constructors
2023-10-08 17:08:32 -05:00
Sean Leary
776b5ccb85
Merge pull request #778 from Madjosz/fix_xml_test
...
Fix XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig() for Windows - in the test
2023-10-08 17:06:55 -05:00
Sean Leary
fb99c06bad
Merge branch 'master' into fix_xml_test
2023-10-08 17:03:35 -05:00
Sean Leary
bc09f90e90
Merge pull request #782 from mureinik/XMLTest-windows
...
Fix XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig() for Windows - in the test
2023-10-08 17:00:25 -05: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
Madjosz
0e4a94d91d
fix failing test XML test on Windows machines
2023-10-07 09:38:07 +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
Allon Mureinik
4c8cac22a8
Use System.lineSeparator()
...
Use the built-in System.lineSeparator() instead of implementing it
ourselves with System.getProperty("line.separator") in order to clean
up the code and make it easier to maintain.
2023-10-05 19:47:33 +03:00
Allon Mureinik
fe45fa9cfb
Fix XMLTest on Windows
...
XMLTest.testIndentComplicatedJsonObjectWithArrayAndWithConfig fails
when run on Windows due to mismatching linebreaks (that aren't
important for the test's functionality) between the actual and
expected strings.
For the actual strings, linebreaks are canonized to the platform's
native linebreak using `replaceAll("\\n|\\r\\n",
System.getProperty("line.separator")`. However, the expected result is
read from a file, and is left with the linebreaks that were originally
used to create it.
The solution is to perform the same canonization on both strings.
Closes #781
2023-10-05 15:36:07 +03:00
Sean Leary
79af389f7a
Merge pull request #774 from mccartney/removing-synchronized
...
Removing excessive synchronization
2023-10-04 07:40:10 -05:00
Sean Leary
1726b6cf55
Merge pull request #776 from mccartney/junit-4-13-2
...
JUnit 4.13.2
2023-10-04 07:39:26 -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
ff921db783
Junit 4.13.2
2023-09-30 21:53:36 +02:00
Grzegorz Olędzki
61bb60e752
Removing excessive synchronization
2023-09-30 21:36:11 +02: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
Éamonn McManus
16967f322e
Simplify the check for object keys that are themselves objects.
...
For object keys, we can just skip the part of `nextValue()` that parses values
that are objects or arrays. Then the existing logic for unquoted values will
already stop at `{` or `[`, and that will produce a `Missing value` exception.
2023-09-27 12:42:04 -07:00
Edijs
284a316838
Add optJSONArray and optJSONObject methods to JSONArray with a default value
2023-09-27 19:30:45 +03:00
Sean Leary
4e8231c512
Merge pull request #770 from eamonnmcmanus/testfixes
...
Small test fixes.
2023-09-25 20:37:44 -05: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
simonh5
ca88454f1c
fix: flakiness in org.json.junit.JSONObjectTest#valueToString
2023-09-19 14:28:06 -05: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
simonh5
becc1631e6
fix: flakiness in JSONMLTest#testToJSONObject_reversibility
2023-09-18 20:20:13 -05:00
Sean Leary
01727fd0ed
Merge pull request #769 from jscrdev/fixed-warnings
...
Addressed Java 17 compile warnings
2023-09-16 08:30:44 -05:00
Valentyn Kolesnikov
74cd73f97c
Addressed compile warnings
2023-09-08 07:34:00 +03:00
Sean Leary
c29d4881e0
Merge pull request #741 from jscrdev/setup-java-11
...
Configure Java 8 as the minimum required version
2023-09-03 17:17:04 -05:00
Sean Leary
7c1b6531e7
Update CONTRIBUTING.md
...
Updated for Hacktoberfest 2023
2023-09-03 11:35:15 -05:00
Valentyn Kolesnikov
db122e5d3a
Merge branch 'master' into setup-java-11
2023-09-03 18:40:40 +03:00
Sean Leary
a309931d20
Merge pull request #761 from bowbahdoe/master
...
Add module-info
2023-09-03 10:35:21 -05:00
Valentyn Kolesnikov
e27da22e05
Update build.gradle
2023-08-29 05:00:13 +03:00
Valentyn Kolesnikov
af6d07cecb
Resolved Gradle build dependency
2023-08-29 03:22:20 +03:00
Sean Leary
64093366b3
Merge pull request #764 from johnjaylward/CodeQl_Pipeline_Update
...
Update CodeQL action version
2023-08-28 19:20:36 -05:00
John J. Aylward
9b69ec49ad
update CodeQL action version
2023-08-28 12:51:52 -04:00
Valentyn Kolesnikov
2c674be1b6
Update pipeline.yml
2023-08-28 19:06:27 +03:00
Valentyn Kolesnikov
be33deb7d5
Update README.md
2023-08-28 19:04:30 +03:00
Valentyn Kolesnikov
48089a4da7
Update pipeline.yml
2023-08-28 19:04:30 +03:00
Valentyn Kolesnikov
a4e152f4f0
Update pipeline.yml
2023-08-28 19:03:43 +03:00
dburbrid
3dd8f2ecd5
Correction of bug when compiling/testing on Windows: Issue537 file must be read as UTF-8 (Issue 745)
2023-08-28 19:03:40 +03:00
Valentyn Kolesnikov
bae0b0dac9
Updated mockito
2023-08-28 19:01:47 +03:00
Valentyn Kolesnikov
e563dbcaaa
Setup java 8 as minimum version
2023-08-28 19:00:00 +03:00
Ethan McCue
50dfcc59b3
Remove automatic module name
2023-08-16 11:25:15 -04:00
Ethan McCue
b2943eb395
Add module-info to maven build
2023-08-16 11:24:57 -04:00
Sean Leary
60662e2f83
Merge pull request #759 from eamonnmcmanus/eofnull
...
JSON parsing should detect embedded `\0` values
2023-08-05 08:33:26 -05:00
Éamonn McManus
2a4bc3420a
Apply simplification suggested by @johnjaylward.
2023-08-01 14:38:45 -07:00
Éamonn McManus
b6ff0db984
Fix indentation in test.
2023-08-01 13:49:59 -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
Sean Leary
402db6ad84
Merge pull request #753 from davejbur/add-object-methods-and-test
...
Updated new object methods
2023-07-14 20:03:13 -05: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