/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ecbeta.common.core.viewer;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author Ronghai Wei <ronghai.wei@outlook.com>
 */
public class JsonModel implements Serializable{
    
    private final Map<String, Object> data = new HashMap<>();

    public Object put(String key, Object value) {
        return data.put(key, value);
    }

    public JsonModel() {
    }
    
    
    public String toJson(){
        return "";
    }
}

@@ -218,16 +218,46 @@
 viewer;%0A
+import net.sf.json.JSONObject;
 %0Aimport 
@@ -685,10 +685,46 @@
 urn 
-%22%22
+JSONObject.fromObject(data).toString()
 ;%0A  

implement toJson