mirror of
https://github.com/fangyidong/json-simple.git
synced 2025-12-08 00:10:53 +03:00
Added Constructor public JSONObject(Map map).
This commit is contained in:
@@ -16,8 +16,25 @@ import java.util.Map;
|
|||||||
* @author FangYidong<fangyidong@yahoo.com.cn>
|
* @author FangYidong<fangyidong@yahoo.com.cn>
|
||||||
*/
|
*/
|
||||||
public class JSONObject extends HashMap implements Map, JSONAware, JSONStreamAware{
|
public class JSONObject extends HashMap implements Map, JSONAware, JSONStreamAware{
|
||||||
|
|
||||||
private static final long serialVersionUID = -503443796854799292L;
|
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.
|
* Encode a map into JSON text and write it to out.
|
||||||
* If this map is also a JSONAware or JSONStreamAware, JSONAware or JSONStreamAware specific behaviours will be ignored at this top level.
|
* If this map is also a JSONAware or JSONStreamAware, JSONAware or JSONStreamAware specific behaviours will be ignored at this top level.
|
||||||
|
|||||||
Reference in New Issue
Block a user