public interface ClassSerializer extends ClassHelper
Modifier and Type | Method and Description |
---|---|
Object |
toJava(JSONObject jsonObj,
JSONSerializer serializer,
HashMap<Object,Object> aPool)
Convert JSON representation into an instance of a class.
|
void |
toJSON(Object javaObj,
JSONObject jsonContainer,
JSONSerializer serializer,
HashMap<Object,Object> aPool)
Convert an element to JSON.
|
getHelpedClass
void toJSON(Object javaObj, JSONObject jsonContainer, JSONSerializer serializer, HashMap<Object,Object> aPool) throws SerializerException
javaObj
- Instance that should be rendered to JSON.jsonContainer
- The parent element where we have to put the rendered information. A helper is allowed to add
child elements.serializer
- The marshal we can use to recursively render parts of our own object.aPool
- A pool of objects already encountered. Is used to resolve references.SerializerException
Object toJava(JSONObject jsonObj, JSONSerializer serializer, HashMap<Object,Object> aPool) throws SerializerException
jsonObj
- The source element we have to convert into an object.serializer
- The marshal we can use to convert sub elements into sub objects to compose our target object.aPool
- A pool of objects already encountered. Is used to resolve references.SerializerException
Copyright © 2012. All Rights Reserved.