Package 

Class JSONDecoder

  • All Implemented Interfaces:
    io.outfoxx.sunday.mediatypes.codecs.MediaTypeDecoder , io.outfoxx.sunday.mediatypes.codecs.StructuredMediaTypeDecoder , io.outfoxx.sunday.mediatypes.codecs.TextMediaTypeDecoder

    
    public final class JSONDecoder
    extends ObjectMapperDecoder implements TextMediaTypeDecoder
                        

    Decodes binary and text JSON data into Java/Kotlin types using Jackson.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class JSONDecoder.Companion
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final ObjectMapper objectMapper
    • Constructor Summary

      Constructors 
      Constructor Description
      JSONDecoder(JsonMapper jsonMapper)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T extends Any> T decode(String data, KType type) Decodes text into a specific Java/Kotlin type.
      • Methods inherited from class io.outfoxx.sunday.mediatypes.codecs.ObjectMapperDecoder

        decode, decode, getObjectMapper
      • Methods inherited from class kotlin.Any

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JSONDecoder

        JSONDecoder(JsonMapper jsonMapper)
    • Method Detail

      • decode

         <T extends Any> T decode(String data, KType type)

        Decodes text into a specific Java/Kotlin type.

        Parameters:
        data - Text data.
        type - Target Java/Kotlin type.