Class LongJsonAdapter

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

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

    • LongJsonAdapter

      public LongJsonAdapter()
  • Method Details

    • serialize

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

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