Class GsonUtils.GsonPostProcessableTypeAdapterFactory

java.lang.Object
google.registry.tools.GsonUtils.GsonPostProcessableTypeAdapterFactory
All Implemented Interfaces:
com.google.gson.TypeAdapterFactory
Enclosing class:
GsonUtils

public static class GsonUtils.GsonPostProcessableTypeAdapterFactory extends Object implements com.google.gson.TypeAdapterFactory
Some objects may require post-processing after deserialization from JSON.

We do this upon deserialization in order to make sure that the object matches the format that we expect to be stored in the database. See Address for an example.

  • Constructor Details

    • GsonPostProcessableTypeAdapterFactory

      public GsonPostProcessableTypeAdapterFactory()
  • Method Details

    • create

      public <T> com.google.gson.TypeAdapter<T> create(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<T> type)
      Specified by:
      create in interface com.google.gson.TypeAdapterFactory