Class MeasurementSerializer

java.lang.Object
org.apache.wayang.commons.util.profiledb.json.MeasurementSerializer
All Implemented Interfaces:
com.google.gson.JsonSerializer<Measurement>

public class MeasurementSerializer extends Object implements com.google.gson.JsonSerializer<Measurement>
Custom serializer for Measurements Detects actual subclass of given instances, encodes this class membership, and then delegates serialization to that subtype.
  • Constructor Details

    • MeasurementSerializer

      public MeasurementSerializer()
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(Measurement measurement, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Measurement>