Class VoucherSecretSerializer
java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<VoucherSecret>
xyz.tcheeric.cashu.voucher.domain.VoucherSecretSerializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public class VoucherSecretSerializer
extends com.fasterxml.jackson.databind.JsonSerializer<VoucherSecret>
Custom Jackson serializer for VoucherSecret.
Serializes VoucherSecret as a hex-encoded string of its canonical CBOR bytes. This is required for Cashu protocol compatibility.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
com.fasterxml.jackson.databind.JsonSerializer.None -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidserialize(VoucherSecret value, 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
-
Constructor Details
-
VoucherSecretSerializer
public VoucherSecretSerializer()
-
-
Method Details
-
serialize
public void serialize(VoucherSecret value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws IOException - Specified by:
serializein classcom.fasterxml.jackson.databind.JsonSerializer<VoucherSecret>- Throws:
IOException
-