Interface JsonSerializer<T>


public interface JsonSerializer<T>
  • Method Details

    • descriptor

      SerializerDescriptor descriptor()
      Gets the SerializerDescriptor of the object this serializer serializes.
      Returns:
      the SerializerDescriptor
    • serialize

      com.google.gson.JsonElement serialize(T obj)
      Serializes from a object to a JsonElement.
      Parameters:
      obj - the object to serialize
      Returns:
      the serialized object as a JsonElement
    • deserializePath

      T deserializePath(JsonElementPath json)
      Deserializes from a JsonElement to the object.
      Parameters:
      json - the JsonElement to deserialize into a object
      Returns:
      the deserialized object from the JsonElement
    • deserialize

      default T deserialize(com.google.gson.JsonElement json)
      Deserializes from a JsonElement to the object.
      Parameters:
      json - the JsonElement to deserialize into a object
      Returns:
      the deserialized object from the JsonElement