diff --git a/json-smart/pom.xml b/json-smart/pom.xml
index 6f8ef200..089226e6 100644
--- a/json-smart/pom.xml
+++ b/json-smart/pom.xml
@@ -3,7 +3,7 @@
4.0.0
net.minidev
json-smart
- 2.2.1
+ 2.2.2-SNAPSHOT
JSON Small and Fast Parser
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.
diff --git a/json-smart/src/main/java/net/minidev/json/JSONArray.java b/json-smart/src/main/java/net/minidev/json/JSONArray.java
index 350d491a..a8b6344f 100644
--- a/json-smart/src/main/java/net/minidev/json/JSONArray.java
+++ b/json-smart/src/main/java/net/minidev/json/JSONArray.java
@@ -79,6 +79,18 @@ public static void writeJSONString(List extends Object> list, Appendable out)
writeJSONString(list, out, JSONValue.COMPRESSION);
}
+ /**
+ * Appends the specified element and returns this.
+ * Handy alternative to add(E e) method.
+ *
+ * @param element element to be appended to this array.
+ * @return this
+ */
+ public JSONArray appendElement(Object element) {
+ add(element);
+ return this;
+ }
+
public void merge(Object o2) {
JSONObject.merge(this, o2);
}
diff --git a/json-smart/src/main/java/net/minidev/json/JSONObject.java b/json-smart/src/main/java/net/minidev/json/JSONObject.java
index e9ae547b..ddf0d3b0 100644
--- a/json-smart/src/main/java/net/minidev/json/JSONObject.java
+++ b/json-smart/src/main/java/net/minidev/json/JSONObject.java
@@ -98,6 +98,19 @@ else if (!compression.mustProtectKey(key))
JSONValue.writeJSONString(value, out, compression);
}
+ /**
+ * Puts value to object and returns this.
+ * Handy alternative to put(String key, Object value) method.
+ *
+ * @param fieldName key with which the specified value is to be associated
+ * @param fieldValue value to be associated with the specified key
+ * @return this
+ */
+ public JSONObject appendField(String fieldName, Object fieldValue) {
+ put(fieldName, fieldValue);
+ return this;
+ }
+
/**
* A Simple Helper object to String
*
diff --git a/parent/pom.xml b/parent/pom.xml
index 8b66677b..1cac51b6 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -3,7 +3,7 @@
4.0.0
net.minidev
minidev-parent
- 2.2.1
+ 2.2.2-SNAPSHOT
Minidev super pom
minidev common properties.
pom