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
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Bug fixes, code improvements, and unit test coverage changes are welcome! Becaus
40
40
# Build Instructions
41
41
42
42
The org.json package can be built from the command line, Maven, and Gradle. The unit tests can be executed from Maven, Gradle, or individually in an IDE e.g. Eclipse.
43
-
43
+
44
44
**Building from the command line**
45
45
46
46
*Build the class files from the package root directory src/main/java*
@@ -83,7 +83,7 @@ java -cp .:json-java.jar Test (Unix Systems)
83
83
{"abc":"def"}
84
84
```
85
85
86
-
86
+
87
87
**Tools to build the package and execute the unit tests**
88
88
89
89
Execute the test suite with Maven:
@@ -109,6 +109,23 @@ gradlew testWithStrictMode
109
109
mvn test -P test-strict-mode
110
110
```
111
111
112
+
# Milestone 2
113
+
114
+
For the Milestone 2 of SWE262P, 2 new functions were added:
The first one takes in 2 parameters, a `Reader` object which contains some XML input and a `JSONPointer` object that includes a json path for querying, and returns a `JSONObject` object which has the corresponding path, or throw an error if that path does not exist.
122
+
123
+
The first one takes in 3 parameters, a `Reader` object which contains some XML input and a `JSONPointer` object that includes a json path for querying, and a `JSONObject` for replacement. And returns a new `JSONObject` object which has the corresponding path replaced with the new given object, or throw an error if that path does not exist.
124
+
125
+
Both new functions are placed in the `XML.java` file.
126
+
127
+
The test cases of the functions are placed under the `org.json.junit.milestone2.tests` package, and to run the test case which deals with large file input, first create a folder named `xml_files` under the `/src/test/resources` path, and put the xml files for testing under this path.
128
+
112
129
# Notes
113
130
114
131
For more information, please see [NOTES.md](https://github.com/stleary/JSON-java/blob/master/docs/NOTES.md)
0 commit comments