diff --git a/CHANGELOG.md b/CHANGELOG.md
index 06d5aef..d4c5349 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# Version 1.1.0
+
+- Added the method `JSONObject#compact()`
+- Added the method `JSONObject#toXML(String)`
+- Added the method `JSONArray#toXML(String)`
+
+
# Version 1.0.0
- Release
\ No newline at end of file
diff --git a/README.md b/README.md
index b08d7d8..f98022f 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ It was a casting hell. And on top of that, you could not serialize and deseriali
- [x] formatting and minimizing JSON data
- [x] light weight JSON writing
- [x] a `JSONObject` and `JSONArray` class allowing for reading and writing of JSON data even without serializing
+- [x] converting JSON into XML
# Requirements
diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html
index a8e040d..6a8d08e 100644
--- a/docs/allclasses-frame.html
+++ b/docs/allclasses-frame.html
@@ -2,9 +2,9 @@
-
+
All Classes
-
+
diff --git a/docs/allclasses-noframe.html b/docs/allclasses-noframe.html
index a6d5933..312e987 100644
--- a/docs/allclasses-noframe.html
+++ b/docs/allclasses-noframe.html
@@ -2,9 +2,9 @@
-
+
All Classes
-
+
diff --git a/docs/constant-values.html b/docs/constant-values.html
index 092a83d..2fc18e5 100644
--- a/docs/constant-values.html
+++ b/docs/constant-values.html
@@ -2,9 +2,9 @@
-
+
Constant Field Values
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONArray.html b/docs/de/ralleytn/simple/json/JSONArray.html
index af88be6..e4efd46 100644
--- a/docs/de/ralleytn/simple/json/JSONArray.html
+++ b/docs/de/ralleytn/simple/json/JSONArray.html
@@ -2,9 +2,9 @@
-
+
JSONArray
-
+
@@ -18,7 +18,7 @@
catch(err) {
}
//-->
-var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":9,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":10};
+var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":9,"i36":9,"i37":9,"i38":9,"i39":9,"i40":9,"i41":9,"i42":9,"i43":9,"i44":9,"i45":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@@ -135,7 +135,7 @@ Class JSONArray
Since:
1.0.0
Version:
-1.0.0
+1.1.0
Author:
FangYidong(fangyidong@yahoo.com.cn), Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
See Also:
@@ -448,76 +448,80 @@ Method Summary
+java.lang.String
+toXML (java.lang.String rootName)
+
+
static void
writeJSONString (boolean[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static void
writeJSONString (byte[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static void
writeJSONString (char[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static void
writeJSONString (java.util.Collection<?> collection,
java.io.Writer writer)
Encode a Collection into JSON text and write it to a Writer.
-
+
static void
writeJSONString (double[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static void
writeJSONString (float[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static void
writeJSONString (int[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static void
writeJSONString (long[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static void
writeJSONString (short[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
static <T> void
writeJSONString (T[] array,
java.io.Writer writer)
Encode an array into JSON text and write it to a Writer.
-
+
void
writeJSONString (java.io.Writer writer)
Writes a JSON encoded string on a Writer.
@@ -1720,7 +1724,7 @@ toObjectArray
-
diff --git a/docs/de/ralleytn/simple/json/JSONAttribute.Type.html b/docs/de/ralleytn/simple/json/JSONAttribute.Type.html
index 77f9b3f..287f006 100644
--- a/docs/de/ralleytn/simple/json/JSONAttribute.Type.html
+++ b/docs/de/ralleytn/simple/json/JSONAttribute.Type.html
@@ -2,9 +2,9 @@
-
+
JSONAttribute.Type
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONAttribute.html b/docs/de/ralleytn/simple/json/JSONAttribute.html
index 26523fc..0f20407 100644
--- a/docs/de/ralleytn/simple/json/JSONAttribute.html
+++ b/docs/de/ralleytn/simple/json/JSONAttribute.html
@@ -2,9 +2,9 @@
-
+
JSONAttribute
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONAware.html b/docs/de/ralleytn/simple/json/JSONAware.html
index ebd63c7..bfb941c 100644
--- a/docs/de/ralleytn/simple/json/JSONAware.html
+++ b/docs/de/ralleytn/simple/json/JSONAware.html
@@ -2,9 +2,9 @@
-
+
JSONAware
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONContainerFactory.html b/docs/de/ralleytn/simple/json/JSONContainerFactory.html
index 4809116..535b203 100644
--- a/docs/de/ralleytn/simple/json/JSONContainerFactory.html
+++ b/docs/de/ralleytn/simple/json/JSONContainerFactory.html
@@ -2,9 +2,9 @@
-
+
JSONContainerFactory
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONContentHandler.html b/docs/de/ralleytn/simple/json/JSONContentHandler.html
index f8df155..7d68928 100644
--- a/docs/de/ralleytn/simple/json/JSONContentHandler.html
+++ b/docs/de/ralleytn/simple/json/JSONContentHandler.html
@@ -2,9 +2,9 @@
-
+
JSONContentHandler
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONFormatter.html b/docs/de/ralleytn/simple/json/JSONFormatter.html
index 7ac7a65..8f9440f 100644
--- a/docs/de/ralleytn/simple/json/JSONFormatter.html
+++ b/docs/de/ralleytn/simple/json/JSONFormatter.html
@@ -2,9 +2,9 @@
-
+
JSONFormatter
-
+
@@ -108,7 +108,7 @@ Class JSONFormatter
-public final class JSONFormatter
+public class JSONFormatter
extends java.lang.Object
Provides static methods for formatting and minimizing JSON data.
diff --git a/docs/de/ralleytn/simple/json/JSONObject.html b/docs/de/ralleytn/simple/json/JSONObject.html
index 685d4b6..5ff3ffc 100644
--- a/docs/de/ralleytn/simple/json/JSONObject.html
+++ b/docs/de/ralleytn/simple/json/JSONObject.html
@@ -2,9 +2,9 @@
-
+
JSONObject
-
+
@@ -18,7 +18,7 @@
catch(err) {
}
//-->
-var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":9,"i14":10,"i15":9,"i16":10};
+var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":9,"i15":10,"i16":10,"i17":9,"i18":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
@@ -135,7 +135,7 @@ Class JSONObject
Since:
1.0.0
Version:
-1.0.0
+1.1.0
Author:
FangYidong(fangyidong@yahoo.com.cn), Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
See Also:
@@ -209,37 +209,41 @@ Method Summary
Method and Description
+JSONObject
+compact ()
+
+
JSONArray
getArray (java.lang.String key)
If the value already is a
JSONArray , it will be casted and returned.
-
+
java.lang.Boolean
getBoolean (java.lang.String key)
If the value is already a Boolean, it will be casted and returned.
-
+
java.lang.Byte
getByte (java.lang.String key)
If the value is a Number, its byte
value is returned.
-
+
java.util.Date
getDate (java.lang.String key,
java.text.DateFormat format)
If the value already is a Date, it will be casted and returned.
-
+
java.lang.Double
getDouble (java.lang.String key)
If the value is a Number, its double
value is returned.
-
+
<T extends java.lang.Enum> T
getEnum (java.lang.String key,
java.lang.Class<T> type)
@@ -247,64 +251,68 @@ Method Summary
in the given enum type, it will return the enum constant.
-
+
java.lang.Float
getFloat (java.lang.String key)
If the value is a Number, its float
value is returned.
-
+
java.lang.Integer
getInteger (java.lang.String key)
If the value is a Number, its int
value is returned.
-
+
java.lang.Long
getLong (java.lang.String key)
If the value is a Number, its long
value is returned.
-
+
JSONObject
getObject (java.lang.String key)
If the value is a
JSONObject already, it will be casted and returned.
-
+
java.lang.Short
getShort (java.lang.String key)
If the value is a Number, its short
value is returned.
-
+
java.lang.String
getString (java.lang.String key)
Returns the same as the value's Object.toString()
method.
-
+
java.lang.String
toJSONString ()
-
+
static java.lang.String
toJSONString (java.util.Map<?,?> map)
Convert a Map to JSON text.
-
+
java.lang.String
toString ()
-
+
+java.lang.String
+toXML (java.lang.String rootName)
+
+
static void
writeJSONString (java.util.Map<?,?> map,
java.io.Writer writer)
Encode a Map into JSON text and write it to out.
-
+
void
writeJSONString (java.io.Writer writer)
Writes a JSON encoded string on a Writer.
@@ -504,6 +512,21 @@ toJSONString
+
+
+
+
@@ -772,7 +795,7 @@ getDate
-
diff --git a/docs/de/ralleytn/simple/json/JSONParseException.html b/docs/de/ralleytn/simple/json/JSONParseException.html
index da8d127..c502f82 100644
--- a/docs/de/ralleytn/simple/json/JSONParseException.html
+++ b/docs/de/ralleytn/simple/json/JSONParseException.html
@@ -2,9 +2,9 @@
-
+
JSONParseException
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONParser.html b/docs/de/ralleytn/simple/json/JSONParser.html
index 148b871..a8a6318 100644
--- a/docs/de/ralleytn/simple/json/JSONParser.html
+++ b/docs/de/ralleytn/simple/json/JSONParser.html
@@ -2,9 +2,9 @@
-
+
JSONParser
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONRoot.html b/docs/de/ralleytn/simple/json/JSONRoot.html
index 930de5c..c20b83a 100644
--- a/docs/de/ralleytn/simple/json/JSONRoot.html
+++ b/docs/de/ralleytn/simple/json/JSONRoot.html
@@ -2,9 +2,9 @@
-
+
JSONRoot
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONSerializer.html b/docs/de/ralleytn/simple/json/JSONSerializer.html
index 46597c7..858dd3d 100644
--- a/docs/de/ralleytn/simple/json/JSONSerializer.html
+++ b/docs/de/ralleytn/simple/json/JSONSerializer.html
@@ -2,9 +2,9 @@
-
+
JSONSerializer
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONStreamAware.html b/docs/de/ralleytn/simple/json/JSONStreamAware.html
index 40fc34f..a3438d6 100644
--- a/docs/de/ralleytn/simple/json/JSONStreamAware.html
+++ b/docs/de/ralleytn/simple/json/JSONStreamAware.html
@@ -2,9 +2,9 @@
-
+
JSONStreamAware
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONTypeSerializationHandler.html b/docs/de/ralleytn/simple/json/JSONTypeSerializationHandler.html
index e7119f7..eb3ed02 100644
--- a/docs/de/ralleytn/simple/json/JSONTypeSerializationHandler.html
+++ b/docs/de/ralleytn/simple/json/JSONTypeSerializationHandler.html
@@ -2,9 +2,9 @@
-
+
JSONTypeSerializationHandler
-
+
diff --git a/docs/de/ralleytn/simple/json/JSONValue.html b/docs/de/ralleytn/simple/json/JSONValue.html
index 8477d00..23fd86e 100644
--- a/docs/de/ralleytn/simple/json/JSONValue.html
+++ b/docs/de/ralleytn/simple/json/JSONValue.html
@@ -2,9 +2,9 @@
-
+
JSONValue
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONArray.html b/docs/de/ralleytn/simple/json/class-use/JSONArray.html
index 10efc07..16558d7 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONArray.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONArray.html
@@ -2,9 +2,9 @@
-
+
Uses of Class de.ralleytn.simple.json.JSONArray
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONAttribute.Type.html b/docs/de/ralleytn/simple/json/class-use/JSONAttribute.Type.html
index ce8a344..8ee96d6 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONAttribute.Type.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONAttribute.Type.html
@@ -2,9 +2,9 @@
-
+
Uses of Class de.ralleytn.simple.json.JSONAttribute.Type
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONAttribute.html b/docs/de/ralleytn/simple/json/class-use/JSONAttribute.html
index bd6f4d3..d9418a0 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONAttribute.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONAttribute.html
@@ -2,9 +2,9 @@
-
+
Uses of Class de.ralleytn.simple.json.JSONAttribute
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONAware.html b/docs/de/ralleytn/simple/json/class-use/JSONAware.html
index 5ad7aad..ac823a2 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONAware.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONAware.html
@@ -2,9 +2,9 @@
-
+
Uses of Interface de.ralleytn.simple.json.JSONAware
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONContainerFactory.html b/docs/de/ralleytn/simple/json/class-use/JSONContainerFactory.html
index 17bdeab..b40faec 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONContainerFactory.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONContainerFactory.html
@@ -2,9 +2,9 @@
-
+
Uses of Interface de.ralleytn.simple.json.JSONContainerFactory
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONContentHandler.html b/docs/de/ralleytn/simple/json/class-use/JSONContentHandler.html
index cca9431..5e3fe57 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONContentHandler.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONContentHandler.html
@@ -2,9 +2,9 @@
-
+
Uses of Interface de.ralleytn.simple.json.JSONContentHandler
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONFormatter.html b/docs/de/ralleytn/simple/json/class-use/JSONFormatter.html
index 9c68631..58bda09 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONFormatter.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONFormatter.html
@@ -2,9 +2,9 @@
-
+
Uses of Class de.ralleytn.simple.json.JSONFormatter
-
+
diff --git a/docs/de/ralleytn/simple/json/class-use/JSONObject.html b/docs/de/ralleytn/simple/json/class-use/JSONObject.html
index df92e8b..6bb7503 100644
--- a/docs/de/ralleytn/simple/json/class-use/JSONObject.html
+++ b/docs/de/ralleytn/simple/json/class-use/JSONObject.html
@@ -2,9 +2,9 @@
-
+
Uses of Class de.ralleytn.simple.json.JSONObject
-
+
@@ -88,23 +88,27 @@