Package oracle.jdbc.spi
Interface OsonConverter
public interface OsonConverter
A converter which provides the conversion methods of POJO to OSON bytes and vice versa.
- Since:
- 23.5
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize(OracleJsonParser oParser, Class<?> type) Deserialize the OSON bytes represented by this parser into an instance of the class provided.voidserialize(OracleJsonGenerator oGen, Object object) Serializes the given object using the generator.
-
Method Details
-
serialize
Serializes the given object using the generator.- Parameters:
object- java object to be serialized. Maybe null.oGen- OracleJsonGenerator where the object is serialized into. Not null.- Throws:
IllegalStateException- if serialization fails.
-
deserialize
Deserialize the OSON bytes represented by this parser into an instance of the class provided.- Parameters:
oParser- . An instance of OracleJsonParser representing the oson bytes. Maybe null.type- of the expected object. Not null.- Returns:
- instance of the object created from the provided parser. Maybe null.
- Throws:
IllegalStateException- if the type mapping is wrong or deserializer fails.
-