Package serialization

Source Code of serialization.JSONSerialization

package serialization;

import flexjson.JSONDeserializer;
import flexjson.JSONSerializer;
import Util.Log;

/**
*
* @author Eldred
*/
public class JSONSerialization extends GenericSerializer
{
    @Override
    public Object unserializeObject(String json)
    {
        JSONDeserializer D = new JSONDeserializer();
       
        return D.deserialize(json);
    }
   
    @Override
    public String serializeObject(Object o)
    {
        JSONSerializer S = new JSONSerializer().include("*").exclude("class");
       
        Log.log("Serialized obj : " + S.deepSerialize(o));
       
        return S.deepSerialize(o);
    }
}
TOP

Related Classes of serialization.JSONSerialization

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.