All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.devswork.util.JSONObject Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
package com.github.devswork.util;

import java.util.Map;


public class JSONObject implements java.io.Serializable{

	private static final long serialVersionUID = -4926471374344394316L;

	private com.alibaba.fastjson.JSONObject obj=null;
	
	public JSONObject(){
		obj = new com.alibaba.fastjson.JSONObject(false);
	}
	
	public JSONObject(boolean ordered){
		obj = new com.alibaba.fastjson.JSONObject(ordered);
	}
	
	public JSONObject(Map map){
		obj = new com.alibaba.fastjson.JSONObject(map);
	}
	
	public void put(String key,Object value){
		obj.put(key, value);
	}
	
	public void put(Map map){
		obj.putAll(map);
	}
	
	public String toJson(){
		return obj.toJSONString();
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy