Class InheritanceAdapter

java.lang.Object
io.jmix.dashboards.converter.InheritanceAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer, com.google.gson.JsonSerializer

public class InheritanceAdapter extends Object implements com.google.gson.JsonSerializer, com.google.gson.JsonDeserializer
Supports JSON serialization/deserialization for inherited classes
  • Field Details

  • Constructor Details

    • InheritanceAdapter

      public InheritanceAdapter()
  • Method Details

    • deserialize

      public Object deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(Object src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer
    • getObjectClass

      protected Class getObjectClass(String className)