JSON-java
JSON-java copied to clipboard
A reference implementation of a JSON package in Java.
https://github.com/stleary/JSON-java/blob/6f92a3ab4e425123c4b1ac2b8b65a7d9fb1d9bcb/src/main/java/org/json/JSONObject.java#L187 https://github.com/stleary/JSON-java/blob/6f92a3ab4e425123c4b1ac2b8b65a7d9fb1d9bcb/src/main/java/org/json/JSONObject.java#L299 https://github.com/stleary/JSON-java/blob/6f92a3ab4e425123c4b1ac2b8b65a7d9fb1d9bcb/src/main/java/org/json/JSONObject.java#L301 https://github.com/stleary/JSON-java/blob/6f92a3ab4e425123c4b1ac2b8b65a7d9fb1d9bcb/src/main/java/org/json/JSONObject.java#L475 https://github.com/stleary/JSON-java/blob/6f92a3ab4e425123c4b1ac2b8b65a7d9fb1d9bcb/src/main/java/org/json/JSONObject.java#L2673 Not work ``` public static void main(String[] args) { String json1 = "{\n" + " \"b\": \"b\",\n" + " \"a\": \"a\"\n" + "}"; JSONObject jsonObject...
> JSONObject(Map): Throws NPE if key is null A bit late here, but I would consider throwing an exception for an input that used to be accepted a breaking API...
I was playing with parsing CSV files into JSON using CDL library from org.json.CDL and I observed a strange behavior. When I pass a CSV with an empty last value...
This has been a "known" issue for some time, but as mentioned in #672, the `JSONArray.iterator` method is exposing the raw values from the backing array instead of JSON-compliant values....
In https://github.com/stleary/JSON-java/blob/master/src/main/java/org/json/JSONPropertyIgnore.java the class has documentation, but the docs doesn't show on the website http://stleary.github.io/JSON-java/org/json/JSONPropertyIgnore.html. Can it get fixed?
The current `JSONArray#toList()` converts the array to a list of Object. This makes things a little tough to work with. When, for example, you have a list of typically JSON...
https://github.com/stleary/JSON-java/blame/master/src/main/java/org/json/JSONObject.java#L2080 ``` System.out.println(java.lang.Character.isISOControl(0x007f)); System.out.println(new JSONObject("{\"a\":\"\u007f\"}").toString(0)); ```
If we create a `JSONObject` from a string containing `null` values, those are parsed internally as `JSONObject.NULL` [see 1]. However, when creating a `JSONObject` from a `Map`, `null` values are...
Hi there, We found a problem today where we stopped using `getLong(String)` and started using `optLong(String)` as it doesn't throw exception. The problem is that there are inconsistencies between the...
Sure, the specs don't specify an ordering (as correctly pointed out in the javadocs), but a particular implementation - such as this one - _can_ provide some ordering semantics. It...