From 8f55f3a0d08b54b591a53708334505b0febbcfd7 Mon Sep 17 00:00:00 2001 From: "Dieter.Krachtus" Date: Fri, 6 Mar 2009 08:27:21 +0000 Subject: [PATCH] Added Constructor public JSONObject(Map map). --- src/org/json/simple/JSONObject.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/org/json/simple/JSONObject.java b/src/org/json/simple/JSONObject.java index d4401e1..104f446 100644 --- a/src/org/json/simple/JSONObject.java +++ b/src/org/json/simple/JSONObject.java @@ -16,7 +16,24 @@ import java.util.Map; * @author FangYidong */ public class JSONObject extends HashMap implements Map, JSONAware, JSONStreamAware{ + private static final long serialVersionUID = -503443796854799292L; + + + public JSONObject() { + super(); + } + + /** + * Allows creation of a JSONObject from a Map. After that, both the + * generated JSONObject and the Map can be modified independently. + * + * @param map + */ + public JSONObject(Map map) { + super(map); + } + /** * Encode a map into JSON text and write it to out.