Interface JsonDeserializer<T>

Type Parameters:
T - the type this deserializer produces
All Superinterfaces:
JsonComponent<T>
All Known Subinterfaces:
JsonConverter<T>

public interface JsonDeserializer<T> extends JsonComponent<T>
Interface for deserializing JSON to Java objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deserializes JSON data from the parser into an object of type T.
    default T
    Return the default value when deserializing a null JSON value.

    Methods inherited from interface io.helidon.json.binding.JsonComponent

    configure, type
  • Method Details

    • deserialize

      T deserialize(JsonParser parser)
      Deserializes JSON data from the parser into an object of type T. This method should never be called if the value in the parser is null. If the value is null, use deserializeNull() instead.
      Parameters:
      parser - the JSON parser to read from
      Returns:
      the deserialized object
    • deserializeNull

      default T deserializeNull()
      Return the default value when deserializing a null JSON value.

      This method is called when a JSON null value is encountered. The default implementation returns null.

      Returns:
      the deserialized null value, typically null