Interface JSONTypeSerializationHandler


public interface JSONTypeSerializationHandler
Is needed to manage none-JSON types when serializing or deserializing objects.
Since:
1.0.0
Version:
2.0.0
Author:
Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(Class<?> type, Object value)
    Is called when the needed type is a none-JSON type.
    serialize(Class<?> type, Object value)
    Is called when an object is being serialized and a none-JSON type is reached.
  • Method Details

    • serialize

      Object serialize(Class<?> type, Object value)
      Is called when an object is being serialized and a none-JSON type is reached.
      Parameters:
      type - the none-JSON type
      value - the value
      Returns:
      a JSON type value that will be written into the object
      Since:
      1.0.0
    • deserialize

      Object deserialize(Class<?> type, Object value)
      Is called when the needed type is a none-JSON type.
      Parameters:
      type - the needed type
      value - the value from the JSONObject
      Returns:
      the value to which the Java object attribute will be set
      Since:
      1.0.0