Class JsonObjectConverter
- java.lang.Object
-
- com.oracle.coherence.io.json.internal.JsonObjectConverter
-
- All Implemented Interfaces:
Converter<JsonObject>,Deserializer<JsonObject>,Serializer<JsonObject>
@HandleClassMetadata public class JsonObjectConverter extends Object implements Converter<JsonObject>
AConverterforJsonObjectinstances.- Since:
- 20.06
-
-
Field Summary
Fields Modifier and Type Field Description static JsonObjectConverterINSTANCEThe singleton instance forJsonObjectConverter.
-
Constructor Summary
Constructors Modifier Constructor Description protectedJsonObjectConverter()Creates a newJsonObjectConverter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonObjectdeserialize(ObjectReader reader, Context ctx)voidserialize(JsonObject obj, ObjectWriter writer, Context ctx)
-
-
-
Field Detail
-
INSTANCE
public static final JsonObjectConverter INSTANCE
The singleton instance forJsonObjectConverter.
-
-
Method Detail
-
serialize
public void serialize(JsonObject obj, ObjectWriter writer, Context ctx) throws Exception
- Specified by:
serializein interfaceConverter<JsonObject>- Specified by:
serializein interfaceSerializer<JsonObject>- Parameters:
obj- we want to serialize. The object is of type T or a subclass (if this serializer has been registered for subclasses).writer- to use to write data to the output stream.ctx- the current context.- Throws:
JsonBindingExceptionJsonStreamExceptionException
-
deserialize
public JsonObject deserialize(ObjectReader reader, Context ctx) throws Exception
- Specified by:
deserializein interfaceConverter<JsonObject>- Specified by:
deserializein interfaceDeserializer<JsonObject>- Parameters:
reader- used to read data from.ctx- the current context.- Returns:
- an instance of T or a subclass of T.
- Throws:
JsonBindingExceptionJsonStreamExceptionException
-
-