Package ru.moysklad.remap_1_2.utils.json
Class ProductMarkerSerializer
- java.lang.Object
-
- ru.moysklad.remap_1_2.utils.json.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 Summary
Constructors Constructor Description ProductMarkerSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductMarkerdeserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context)com.google.gson.JsonElementserialize(ProductMarker src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
-
-
Method Detail
-
serialize
public com.google.gson.JsonElement serialize(ProductMarker src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
- Specified by:
serializein interfacecom.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:
deserializein interfacecom.google.gson.JsonDeserializer<ProductMarker>- Throws:
com.google.gson.JsonParseException
-
-