Interface JsonAdapter<T>


public interface JsonAdapter<T>
The core API for serialization to and from json.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Factory for creating a JsonAdapter.
  • Method Summary

    Modifier and Type
    Method
    Description
    Read the type from the reader.
    default boolean
    Return true if this adapter represents a json object or json array of objects that supports json views.
    default JsonAdapter<T>
    Return a null safe version of this adapter.
    void
    toJson(JsonWriter writer, T value)
    Write the value to the writer.
    Return the ViewBuilder.Aware for this adapter.
  • Method Details

    • toJson

      void toJson(JsonWriter writer, T value)
      Write the value to the writer.
    • fromJson

      T fromJson(JsonReader reader)
      Read the type from the reader.
    • nullSafe

      default JsonAdapter<T> nullSafe()
      Return a null safe version of this adapter.
    • isViewBuilderAware

      default boolean isViewBuilderAware()
      Return true if this adapter represents a json object or json array of objects that supports json views.
    • viewBuild

      default ViewBuilderAware viewBuild()
      Return the ViewBuilder.Aware for this adapter.