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
Copy file name to clipboardExpand all lines: README.md
+14-19Lines changed: 14 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The files in this package implement JSON encoders/decoders in Java.
12
12
It also includes the capability to convert between JSON and XML, HTTP
13
13
headers, Cookies, and CDL.
14
14
15
-
This is a reference implementation. There is a large number of JSON packages
15
+
This is a reference implementation. There are a large number of JSON packages
16
16
in Java. Perhaps someday the Java community will standardize on one. Until
17
17
then, choose carefully.
18
18
@@ -22,28 +22,28 @@ package.
22
22
23
23
The package compiles on Java 1.6-1.8.
24
24
25
-
**Recently [#515 Merge tests and pom and code](https://github.com/stleary/JSON-java/pull/515), the structure of the project changed from a flat directory containing all of the Java files to a directory structure that includes unit tests and several build tools to build the project jar and run the unit tests. If you have difficulty using the new structure, please open an issue so we can work through it.
25
+
Recently [#515 Merge tests and pom and code](https://github.com/stleary/JSON-java/pull/515), the structure of the project changed from a flat directory containing all of the Java files to a directory structure that includes unit tests and several build tools to build the project jar and run the unit tests. If you have difficulty using the new structure, please open an issue so we can work through it.
26
26
27
-
**Building from the command line
27
+
**Building from the command line**
28
28
29
-
*Build the class files from the package root directory src/main/java
29
+
*Build the class files from the package root directory src/main/java*
30
30
31
31
** javac org\json\*.java
32
32
33
-
*Build the jar file
33
+
*Build the jar file*
34
34
35
35
** jar cf json-java.jar org/json/*.class
36
36
37
-
*Compile a program that uses the jar (see below example code)
37
+
*Compile a program that uses the jar (see below example code)*
38
38
39
39
** javac -cp .;json-java.jar Test.java
40
40
41
-
*Excecute the Test file
41
+
*Excecute the Test file*
42
42
43
43
** java -cp .;json-java.jar Test
44
44
45
45
46
-
*Test file contents
46
+
*Test file contents*
47
47
48
48
````
49
49
import org.json.JSONObject;
@@ -55,22 +55,17 @@ public class Test {
55
55
}
56
56
````
57
57
58
-
*Expected output
58
+
*Expected output*
59
59
60
60
````
61
61
{"abc":"def"}
62
62
````
63
63
64
64
65
-
*You can only run the unit tests with Maven or Gradlew.
65
+
*You can only run the unit tests with Maven or Gradlew.*
66
66
67
-
** mvn clean test
68
67
69
-
** gradlew clean test
70
-
71
-
72
-
73
-
**Files
68
+
#Files
74
69
75
70
**JSONObject.java**: The `JSONObject` can parse text from a `String` or a `JSONTokener`
76
71
to produce a map-like object. The object provides methods for manipulating its
0 commit comments