public class ColorSerializer extends AbstractSerializer
| Constructor and Description |
|---|
ColorSerializer() |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getHelpedClass() |
Object |
toJava(JSONObject aObjectElement,
JSONSerializer serializer,
HashMap<Object,Object> aPool)
Convert JSON representation into an instance of a class.
|
void |
toJSON(Object aObj,
JSONObject aParent,
JSONSerializer serializer,
HashMap<Object,Object> aPool)
Convert an element to JSON.
|
equalspublic Object toJava(JSONObject aObjectElement, JSONSerializer serializer, HashMap<Object,Object> aPool) throws SerializerException
ClassSerializeraObjectElement - 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.SerializerExceptionpublic void toJSON(Object aObj, JSONObject aParent, JSONSerializer serializer, HashMap<Object,Object> aPool) throws SerializerException
ClassSerializertoJSON in interface ClassSerializertoJSON in class AbstractSerializeraObj - Instance that should be rendered to JSON.aParent - 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.SerializerExceptionpublic Class<?> getHelpedClass()
Copyright © 2012. All Rights Reserved.