Class YearMonthConverter
- java.lang.Object
-
- hu.icellmobilsoft.coffee.tool.gson.YearMonthConverter
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<YearMonth>,com.google.gson.JsonSerializer<YearMonth>
public class YearMonthConverter extends Object implements com.google.gson.JsonSerializer<YearMonth>, com.google.gson.JsonDeserializer<YearMonth>
Json <-> YearMonthHandling YearMonth, \d{4}-\d{2}
DateTimeFormatter.ofPattern(String)patternyyyy-MMYearMonth- Since:
- 1.13.0
- Author:
- janos.boroczki
-
-
Constructor Summary
Constructors Constructor Description YearMonthConverter()Default constructor, constructs a new object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description YearMonthdeserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext)com.google.gson.JsonElementserialize(YearMonth src, Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)
-
-
-
Method Detail
-
deserialize
public YearMonth deserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext) throws com.google.gson.JsonParseException
- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<YearMonth>- Throws:
com.google.gson.JsonParseException
-
-