Interface OsonConverter


  • public interface OsonConverter

    A converter which provides the conversion methods of POJO to OSON bytes and vice versa.

    Since:
    23.5
    • Method Detail

      • serialize

        void serialize​(OracleJsonGenerator oGen,
                       java.lang.Object object)
                throws java.lang.IllegalStateException
        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:
        java.lang.IllegalStateException - if serialization fails.
      • deserialize

        java.lang.Object deserialize​(OracleJsonParser oParser,
                                     java.lang.Class<?> type)
                              throws java.lang.IllegalStateException
        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:
        java.lang.IllegalStateException - if the type mapping is wrong or deserializer fails.