Class OciSdkMicronautSerializer

java.lang.Object
io.micronaut.oraclecloud.serde.OciSdkMicronautSerializer
All Implemented Interfaces:
com.oracle.bmc.http.client.Serializer

@Internal public final class OciSdkMicronautSerializer extends Object implements com.oracle.bmc.http.client.Serializer
Implementation of Serializer based on micronaut serde using ObjectMapper.
Use getDefaultSerializer() method to get the default implementation configured for use inside an Oracle Cloud SDK HTTP client.
  • Constructor Details

    • OciSdkMicronautSerializer

      public OciSdkMicronautSerializer(io.micronaut.json.JsonMapper objectMapper)
      Create Serializer from micronaut serde ObjectMapper.
      Parameters:
      objectMapper - the object mapper
  • Method Details

    • readValue

      public <T> T readValue(String s, Class<T> aClass) throws IOException
      Specified by:
      readValue in interface com.oracle.bmc.http.client.Serializer
      Throws:
      IOException
    • readValue

      public <T> T readValue(byte[] bytes, Class<T> aClass) throws IOException
      Specified by:
      readValue in interface com.oracle.bmc.http.client.Serializer
      Throws:
      IOException
    • writeValueAsString

      public String writeValueAsString(Object o) throws IOException
      Specified by:
      writeValueAsString in interface com.oracle.bmc.http.client.Serializer
      Throws:
      IOException
    • getDefaultObjectMapper

      public static io.micronaut.serde.ObjectMapper getDefaultObjectMapper()
      Returns:
      The implementation of object mapper configured for oci java sdk
    • getDefaultSerializer

      public static com.oracle.bmc.http.client.Serializer getDefaultSerializer()
      Returns:
      The implementation of serializer configured for oci java sdk