Package dev.orne.i18n

Class I18nStringJacksonDeserializer

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<I18nString>
dev.orne.i18n.I18nStringJacksonDeserializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.ContextualDeserializer, com.fasterxml.jackson.databind.deser.NullValueProvider

@API(status=INTERNAL, since="0.1") public class I18nStringJacksonDeserializer extends com.fasterxml.jackson.databind.JsonDeserializer<I18nString> implements com.fasterxml.jackson.databind.deser.ContextualDeserializer
Jackson JSON deserializer for I18nString instances.
Since:
0.1
Version:
1.0, 2021-02
Author:
(w) Iker Hernaez
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    com.fasterxml.jackson.databind.JsonDeserializer.None
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Creates a new instance.
    protected
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JsonDeserializer<?>
    createContextual(@NotNull com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property)
    deserialize(@NotNull com.fasterxml.jackson.core.JsonParser parser, @NotNull com.fasterxml.jackson.databind.DeserializationContext context)
    getConverter(@NotNull Class<?> targetType)
    Returns a converter that converts I18nString instances to the specified target type.

    Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    deserialize, deserializeWithType, deserializeWithType, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer

    Methods inherited from class java.lang.Object

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

    • I18nStringJacksonDeserializer

      public I18nStringJacksonDeserializer()
      Creates a new instance.
    • I18nStringJacksonDeserializer

      protected I18nStringJacksonDeserializer(I18nStringConverter converter)
      Creates a new instance.
      Parameters:
      converter - The converter from I18nString to the target type
  • Method Details

    • createContextual

      public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(@NotNull @NotNull com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
      Specified by:
      createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
    • getConverter

      protected I18nStringConverter getConverter(@NotNull @NotNull Class<?> targetType)
      Returns a converter that converts I18nString instances to the specified target type.
      Parameters:
      targetType - The target type.
      Returns:
      The I18nString type converter.
    • deserialize

      public I18nString deserialize(@NotNull @NotNull com.fasterxml.jackson.core.JsonParser parser, @NotNull @NotNull com.fasterxml.jackson.databind.DeserializationContext context) throws IOException
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<I18nString>
      Throws:
      IOException