mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
Merge branch 'master' of https://github.com/douglascrockford/JSON-java
This commit is contained in:
commit
5b67330b71
4 changed files with 26 additions and 6 deletions
|
@ -1083,6 +1083,8 @@ public class JSONArray implements Iterable<Object> {
|
|||
* <p>
|
||||
* Warning: This method assumes that the data structure is acyclical.
|
||||
*
|
||||
* @param writer
|
||||
* Writes the serialized JSON
|
||||
* @param indentFactor
|
||||
* The number of spaces to add to each level of indentation.
|
||||
* @param indent
|
||||
|
@ -1090,7 +1092,7 @@ public class JSONArray implements Iterable<Object> {
|
|||
* @return The writer.
|
||||
* @throws JSONException
|
||||
*/
|
||||
Writer write(Writer writer, int indentFactor, int indent)
|
||||
public Writer write(Writer writer, int indentFactor, int indent)
|
||||
throws JSONException {
|
||||
try {
|
||||
boolean commanate = false;
|
||||
|
|
|
@ -1781,10 +1781,16 @@ public class JSONObject {
|
|||
* <p>
|
||||
* Warning: This method assumes that the data structure is acyclical.
|
||||
*
|
||||
* @param writer
|
||||
* Writes the serialized JSON
|
||||
* @param indentFactor
|
||||
* The number of spaces to add to each level of indentation.
|
||||
* @param indent
|
||||
* The indention of the top level.
|
||||
* @return The writer.
|
||||
* @throws JSONException
|
||||
*/
|
||||
Writer write(Writer writer, int indentFactor, int indent)
|
||||
public Writer write(Writer writer, int indentFactor, int indent)
|
||||
throws JSONException {
|
||||
try {
|
||||
boolean commanate = false;
|
||||
|
|
18
README
18
README
|
@ -61,14 +61,26 @@ JSONML.java: JSONML provides support for converting between JSONML and XML.
|
|||
|
||||
XMLTokener.java: XMLTokener extends JSONTokener for parsing XML text.
|
||||
|
||||
Unit tests are maintained in a separate project. Contributing developers can test JSON-java pull requests with the code in this project: https://github.com/stleary/JSON-Java-unit-test
|
||||
Unit tests are maintained in a separate project. Contributing developers can test
|
||||
JSON-java pull requests with the code in this project:
|
||||
https://github.com/stleary/JSON-Java-unit-test
|
||||
|
||||
Numeric types in this package comply with ECMA-404: The JSON Data Interchange Format
|
||||
(http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) and
|
||||
RFC 7159: The JavaScript Object Notation (JSON) Data Interchange Format
|
||||
(https://tools.ietf.org/html/rfc7159#section-6).
|
||||
This package fully supports Integer, Long, and Double Java types. Partial support
|
||||
for BigInteger and BigDecimal values in JSONObject and JSONArray objects is provided
|
||||
in the form of get(), opt(), and put() API methods.
|
||||
|
||||
Release history:
|
||||
|
||||
20151123 JSONObject and JSONArray initialization with generics. Contains the
|
||||
latest code as of 23 Nov, 2015.
|
||||
|
||||
20150729 Checkpoint for Maven central repository release. Contains the latest code as of 29 July, 2015.
|
||||
20150729 Checkpoint for Maven central repository release. Contains the latest code
|
||||
as of 29 July, 2015.
|
||||
|
||||
JSON-java releases can be found by searching the Maven repository for groupId "org.json" and artifactId "json". For example:
|
||||
JSON-java releases can be found by searching the Maven repository for groupId "org.json"
|
||||
and artifactId "json". For example:
|
||||
https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.json%22%20AND%20a%3A%22json%22
|
||||
|
|
2
XML.java
2
XML.java
|
@ -31,7 +31,7 @@ import java.util.Iterator;
|
|||
* covert a JSONObject into an XML text.
|
||||
*
|
||||
* @author JSON.org
|
||||
* @version 2015-12-09
|
||||
* @version 2016-01-01
|
||||
*/
|
||||
@SuppressWarnings("boxing")
|
||||
public class XML {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue