Class ProductMarkerSerializer

  • All Implemented Interfaces:
    com.google.gson.JsonDeserializer<ProductMarker>, com.google.gson.JsonSerializer<ProductMarker>

    public class ProductMarkerSerializer
    extends Object
    implements com.google.gson.JsonSerializer<ProductMarker>, com.google.gson.JsonDeserializer<ProductMarker>
    Cериализатор классов-наследников интерфейса ProductMarker. В зависимости от метаданных, возвращает экземпляр одного из классов: Product, Service, Bundle, Variant
    • Constructor Detail

      • ProductMarkerSerializer

        public ProductMarkerSerializer()
    • Method Detail

      • serialize

        public com.google.gson.JsonElement serialize​(ProductMarker src,
                                                     Type typeOfSrc,
                                                     com.google.gson.JsonSerializationContext context)
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<ProductMarker>
      • deserialize

        public ProductMarker 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<ProductMarker>
        Throws:
        com.google.gson.JsonParseException