Class ShortJsonAdapter

java.lang.Object
org.eclipse.keyple.core.util.json.ShortJsonAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Short>, com.google.gson.JsonSerializer<Short>

public class ShortJsonAdapter extends Object implements com.google.gson.JsonSerializer<Short>, com.google.gson.JsonDeserializer<Short>
JSON serializer/deserializer of a short to a hex string.
Since:
2.1.0
  • Constructor Details

    • ShortJsonAdapter

      public ShortJsonAdapter()
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(Short data, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<Short>
      Since:
      2.1.0
    • deserialize

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