Class JSONSerializer
- java.lang.Object
-
- org.eclipse.persistence.sessions.serializers.AbstractSerializer
-
- org.eclipse.persistence.sessions.serializers.XMLSerializer
-
- org.eclipse.persistence.sessions.serializers.JSONSerializer
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Serializer
public class JSONSerializer extends XMLSerializer
Uses EclipseLink Moxy to convert an object to JSON.- See Also:
- Serialized Form
- Author:
- James Sutherland
-
-
Constructor Summary
Constructors Constructor Description JSONSerializer()
JSONSerializer(java.lang.String packageName)
JSONSerializer(JAXBContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
deserialize(java.lang.Object json, Session session)
java.lang.Object
serialize(java.lang.Object object, Session session)
java.lang.String
toString()
-
Methods inherited from class org.eclipse.persistence.sessions.serializers.XMLSerializer
getType, initialize
-
-
-
-
Constructor Detail
-
JSONSerializer
public JSONSerializer()
-
JSONSerializer
public JSONSerializer(java.lang.String packageName)
-
JSONSerializer
public JSONSerializer(JAXBContext context)
-
-
Method Detail
-
serialize
public java.lang.Object serialize(java.lang.Object object, Session session)
- Specified by:
serialize
in interfaceSerializer
- Overrides:
serialize
in classXMLSerializer
-
deserialize
public java.lang.Object deserialize(java.lang.Object json, Session session)
- Specified by:
deserialize
in interfaceSerializer
- Overrides:
deserialize
in classXMLSerializer
-
toString
public java.lang.String toString()
- Overrides:
toString
in classXMLSerializer
-
-