Class ByteJsonAdapter

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

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

    • ByteJsonAdapter

      public ByteJsonAdapter()
  • Method Details

    • serialize

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

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