Class WalletAddressSerializer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<WalletAddress>
io.fliqa.client.interledger.serializer.WalletAddressSerializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class WalletAddressSerializer extends com.fasterxml.jackson.databind.JsonSerializer<WalletAddress>
A custom serializer for the WalletAddress class.

This serializer is used to serialize a WalletAddress object into its JSON representation. Specifically, it writes the string value of the wallet's payment pointer URI to the JSON output. The serialization process ensures that only the payment pointer is included as a string in the resulting JSON.

This serializer is useful for applications that need to interact with JSON-based APIs where wallet addresses are exchanged in a lightweight string format instead of a structured object.

This class extends JsonSerializer and overrides the serialize method to define the custom serialization logic for WalletAddress.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

    com.fasterxml.jackson.databind.JsonSerializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    serialize(WalletAddress address, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers)
     

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WalletAddressSerializer

      public WalletAddressSerializer()
  • Method Details

    • serialize

      public void serialize(WalletAddress address, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws IOException
      Specified by:
      serialize in class com.fasterxml.jackson.databind.JsonSerializer<WalletAddress>
      Throws:
      IOException