JSON-java
JSON-java copied to clipboard
A reference implementation of a JSON package in Java.
For issue #652: This PR detects cycles through collections. It also adds a unit test to verify that this cycle is detected. The PR also adds three additional unit tests...
Motivation: `null` is not a valid return value for Object#toString; for example, see: https://stackoverflow.com/questions/32378264/when-we-override-the-tostring-method-we-should-always-return-a-string-represen Additionally, catching Exception means that any RuntimeException (which is likely a bug in the underlying code)...
when create a JSONObject from XML String like ` : ` spaces at then begin and at the end of string are trimmed ``` public static void main(String[] args) {...
Hello, Is there any reason why JSONObject(int initialCapacity) is protected and not public ? When building a JSONObject from scratch it would be nice to be able to provide the...
JSONObject.getString() removes all spaces from actual value I provided a sample of my code that retrieves the values using optString() (getString() had the same result) How my config system works:...
This fixes issue #871 # StrictMode Implementation for JSONArray ## JSONParserConfiguration Followed the same pattern already in place in JSONParserConfiguration. ```java public class JSONParserConfiguration extends ParserConfiguration { /** * This...
Hi @stleary I have refactored some changes in following files : - 1) populateMap method in JSONObject [Decompose Conditional](https://refactoring.guru/decompose-conditional) : - - There was complex condition which i have moved...
I tried to upgraded the code base to [Junit 5](https://medium.com/@danielbbeleza/5-reasons-why-you-should-use-junit5-with-examples-f052e5e2aaa8) to get new features for unit testing. Below are the steps, I followed : #### Steps: 1. Upgrading dependencies in...
Hi, I recently came across a strange issue in one of my java applications. I have an input string that looks like `[1,2];[3,4]`. This is clearly not a JSON array...
The toString methods of JSONObject and JSONArray are not very fast, mostly because of the usage of `StringWriter` and the generic code to support an indent, although in the default...