Class IntegerJsonAdapter

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

public class IntegerJsonAdapter extends Object implements com.google.gson.JsonSerializer<Integer>, com.google.gson.JsonDeserializer<Integer>
JSON serializer/deserializer of an integer to a hex string.
Since:
2.0.0
  • Constructor Details

    • IntegerJsonAdapter

      public IntegerJsonAdapter()
  • Method Details

    • serialize

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

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