Package 

Class JacksonKt

  • All Implemented Interfaces:

    
    public final class JacksonKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

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

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ObjectMapper getMapper() The Tock jackson mapper.
      final static <T extends Any> T readValue(JsonParser $self) Read value from a JsonParser.
      final static String fieldNameWithValueReady(JsonParser $self) Return the current field name, with the value ready to read.
      final static <FIELDS extends Any> FIELDS read(JsonParser $self, Function2<FIELDS, String, Unit> readValue) Read fields from a JsonParser.
      final static <T extends Any> List<T> readListValues(JsonParser $self) Read a list of values from a JsonParser.
      final static <T extends Any> SimpleModule addDeserializer(SimpleModule $self, KClass<T> type, JsonDeserializer<out T> deser) Add a deserializer in the SimpleModule.
      final static <T extends Any> SimpleModule addSerializer(SimpleModule $self, KClass<T> type, JsonSerializer<in T> ser) Add a serializer in the SimpleModule.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getMapper

         final ObjectMapper getMapper()

        The Tock jackson mapper.

      • readValue

         final static <T extends Any> T readValue(JsonParser $self)

        Read value from a JsonParser.

      • fieldNameWithValueReady

         final static String fieldNameWithValueReady(JsonParser $self)

        Return the current field name, with the value ready to read.

      • read

         final static <FIELDS extends Any> FIELDS read(JsonParser $self, Function2<FIELDS, String, Unit> readValue)

        Read fields from a JsonParser.

      • readListValues

         final static <T extends Any> List<T> readListValues(JsonParser $self)

        Read a list of values from a JsonParser.

      • addDeserializer

         final static <T extends Any> SimpleModule addDeserializer(SimpleModule $self, KClass<T> type, JsonDeserializer<out T> deser)

        Add a deserializer in the SimpleModule.

      • addSerializer

         final static <T extends Any> SimpleModule addSerializer(SimpleModule $self, KClass<T> type, JsonSerializer<in T> ser)

        Add a serializer in the SimpleModule.