From 8688494876025633f16951410365a58d2e38a1d3 Mon Sep 17 00:00:00 2001 From: stleary Date: Wed, 23 Dec 2015 19:53:30 -0600 Subject: [PATCH 1/4] change to public, write(writer, indentfactor, indent) --- JSONArray.java | 4 +++- JSONObject.java | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/JSONArray.java b/JSONArray.java index 5ccb65b..a3df975 100644 --- a/JSONArray.java +++ b/JSONArray.java @@ -1083,6 +1083,8 @@ public class JSONArray implements Iterable { *

* 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 { * @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; diff --git a/JSONObject.java b/JSONObject.java index e52a567..2f613f8 100644 --- a/JSONObject.java +++ b/JSONObject.java @@ -1781,10 +1781,16 @@ public class JSONObject { *

* 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; From a971736f5bb420380003ba2f81cff78081b11e67 Mon Sep 17 00:00:00 2001 From: Sean Leary Date: Fri, 1 Jan 2016 13:52:12 -0600 Subject: [PATCH 2/4] Update version string for https://github.com/douglascrockford/JSON-java/pull/170 --- XML.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XML.java b/XML.java index 8fb6c2b..f14463c 100644 --- a/XML.java +++ b/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 { From e2a0bb16a2e23e6a1f9fc822f07492f41fe1ecec Mon Sep 17 00:00:00 2001 From: Sean Leary Date: Fri, 1 Jan 2016 14:11:02 -0600 Subject: [PATCH 3/4] Update README with number information See https://github.com/douglascrockford/JSON-java/issues/162 --- README | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README b/README index 02d63ad..9867f1b 100644 --- a/README +++ b/README @@ -63,6 +63,11 @@ 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 +Numeric types in this package comply with ECMA-404: The JSON Data Interchange Format (http://www.ecma-international.org/p +ublications/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 pr +ovided in the form of get(), opt(), and put() API methods. + Release history: 20151123 JSONObject and JSONArray initialization with generics. Contains the From 2b2fac3eb12fe09a96535cacbcc45a7539c9a1b5 Mon Sep 17 00:00:00 2001 From: Sean Leary Date: Fri, 1 Jan 2016 16:17:30 -0600 Subject: [PATCH 4/4] Broke up some overly long lines. --- README | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/README b/README index 9867f1b..4d6751c 100644 --- a/README +++ b/README @@ -61,19 +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/p -ublications/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 pr -ovided in the form of get(), opt(), and put() API methods. +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