You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**[Click here if you just want the latest release jar file.](https://repo1.maven.org/maven2/org/json/json/20200518/json-20200518.jar)**
6
+
**[Click here if you just want the latest release jar file.](https://repo1.maven.org/maven2/org/json/json/20201115/json-20201115.jar)**
7
7
8
8
# Overview
9
9
10
-
[JSON](http://www.JSON.org/) is a light-weight languageindependent data interchange format.
10
+
[JSON](http://www.JSON.org/) is a light-weight language-independent data interchange format.
11
11
12
12
The JSON-Java package is a reference implementation that demonstrates how to parse JSON documents into Java objects and how to generate new JSON documents from the Java classes.
13
13
@@ -17,7 +17,7 @@ Project goals include:
17
17
* Easy to build, use, and include in other projects
18
18
* No external dependencies
19
19
* Fast execution and low memory footprint
20
-
* Maintain backwards compatibility
20
+
* Maintain backward compatibility
21
21
* Designed and tested to use on Java versions 1.6 - 1.11
22
22
23
23
The files in this package implement JSON encoders and decoders. The package can also convert between JSON and XML, HTTP headers, Cookies, and CDL.
@@ -26,7 +26,7 @@ The license includes this restriction: ["The software shall be used for good, no
26
26
27
27
**If you would like to contribute to this project**
28
28
29
-
Bug fixes, code improvements, and unit test coverage changes are welcome! Because this project is currrently in maintenance phase, the kinds of changes that can be accepted are limited. For more information, please read the [FAQ](https://github.com/stleary/JSON-java/wiki/FAQ).
29
+
Bug fixes, code improvements, and unit test coverage changes are welcome! Because this project is currently in the maintenance phase, the kinds of changes that can be accepted are limited. For more information, please read the [FAQ](https://github.com/stleary/JSON-java/wiki/FAQ).
30
30
31
31
# Build Instructions
32
32
@@ -61,7 +61,7 @@ public class Test {
61
61
}
62
62
````
63
63
64
-
*Excecute the Test file*
64
+
*Execute the Test file*
65
65
````
66
66
java -cp .;json-java.jar Test
67
67
````
@@ -73,14 +73,14 @@ java -cp .;json-java.jar Test
73
73
````
74
74
75
75
76
-
**Build tools for building the package and executing the unit tests**
76
+
**Tools to build the package and execute the unit tests**
77
77
78
-
The test suite can be executed with Maven by running:
78
+
Execute the test suite with Maven:
79
79
```
80
80
mvn clean test
81
81
```
82
82
83
-
The test suite can be executed with Gradlew by running:
83
+
Execute the test suite with Gradlew:
84
84
85
85
```
86
86
gradlew clean build test
@@ -101,12 +101,12 @@ This package fully supports `Integer`, `Long`, and `Double` Java types. Partial
101
101
for `BigInteger` and `BigDecimal` values in `JSONObject` and `JSONArray` objects is provided
102
102
in the form of `get()`, `opt()`, and `put()` API methods.
103
103
104
-
Although 1.6 compatibility is currently supported, it is not a project goal and may be
104
+
Although 1.6 compatibility is currently supported, it is not a project goal and might be
105
105
removed in some future release.
106
106
107
107
In compliance with RFC8259 page 10 section 9, the parser is more lax with what is valid
108
-
JSON than the Generator. For Example, the tab character (U+0009) is allowed when reading
109
-
JSON Text strings, but when output by the Generator, tab is properly converted to \t in
108
+
JSON then the Generator. For Example, the tab character (U+0009) is allowed when reading
109
+
JSON Text strings, but when output by the Generator, the tab is properly converted to \t in
110
110
the string. Other instances may occur where reading invalid JSON text does not cause an
111
111
error to be generated. Malformed JSON Texts such as missing end " (quote) on strings or
112
112
invalid number formats (1.2e6.3) will cause errors as such documents can not be read
@@ -119,7 +119,7 @@ Some notable exceptions that the JSON Parser in this library accepts are:
119
119
* Numbers out of range for `Double` or `Long` are parsed as strings
120
120
121
121
Recent pull requests added a new method `putAll` on the JSONArray. The `putAll` method
122
-
works similarly as other `put`mehtods in that it does not call `JSONObject.wrap` for items
122
+
works similarly to other `put`methods in that it does not call `JSONObject.wrap` for items
123
123
added. This can lead to inconsistent object representation in JSONArray structures.
124
124
125
125
For example, code like this will create a mixed JSONArray, some items wrapped, others
@@ -169,10 +169,10 @@ For example, <b>Cookie.java</b> is tested by <b>CookieTest.java</b>.
169
169
170
170
<b>General issues with unit testing are:</b><br>
171
171
* Just writing tests to make coverage goals tends to result in poor tests.
172
-
* Unit tests are a form of documentation - how a given method actually works is demonstrated by the test. So for a code reviewer or future developer looking at code a good test helps explain how a function is supposed to work according to the original author. This can be difficult if you are not the original developer.
172
+
* Unit tests are a form of documentation - how a given method works is demonstrated by the test. So for a code reviewer or future developer looking at code a good test helps explain how a function is supposed to work according to the original author. This can be difficult if you are not the original developer.
173
173
* It is difficult to evaluate unit tests in a vacuum. You also need to see the code being tested to understand if a test is good.
174
-
* Without unit tests it is hard to feel confident about the quality of the code, especially when fixing bugs or refactoring. Good tests prevents regressions and keeps the intent of the code correct.
175
-
* If you have unit test results along with pull requests, the reviewer has an easier time understanding your code and determining if the it works as intended.
174
+
* Without unit tests, it is hard to feel confident about the quality of the code, especially when fixing bugs or refactoring. Good tests prevent regressions and keep the intent of the code correct.
175
+
* If you have unit test results along with pull requests, the reviewer has an easier time understanding your code and determining if it works as intended.
176
176
177
177
178
178
# Files
@@ -246,6 +246,8 @@ and artifactId "json". For example:
0 commit comments