Package com.auth0.jwt.impl
Class PayloadSerializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<T>
-
- com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
-
- com.auth0.jwt.impl.ClaimsSerializer<PayloadClaimsHolder>
-
- com.auth0.jwt.impl.PayloadSerializer
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
,com.fasterxml.jackson.databind.jsonschema.SchemaAware
,java.io.Serializable
public class PayloadSerializer extends ClaimsSerializer<PayloadClaimsHolder>
Jackson serializer implementation for converting into JWT Payload parts.This class is thread-safe.
- See Also:
JWTCreator
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PayloadSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
writeClaim(java.util.Map.Entry<java.lang.String,java.lang.Object> entry, com.fasterxml.jackson.core.JsonGenerator gen)
Writes the given entry to the JSON representation.-
Methods inherited from class com.auth0.jwt.impl.ClaimsSerializer
serialize
-
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_neitherNull, _nonEmpty, acceptJsonFormatVisitor, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, getSchema, handledType, isDefaultSerializer, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow
-
-
-
-
Method Detail
-
writeClaim
protected void writeClaim(java.util.Map.Entry<java.lang.String,java.lang.Object> entry, com.fasterxml.jackson.core.JsonGenerator gen) throws java.io.IOException
Description copied from class:ClaimsSerializer
Writes the given entry to the JSON representation. Custom claim serialization handling can override this method to provide use-case specific serialization. Implementors who override this method must write the field name and the field value.- Overrides:
writeClaim
in classClaimsSerializer<PayloadClaimsHolder>
- Parameters:
entry
- The entry that corresponds to the JSON field to writegen
- TheJsonGenerator
to use- Throws:
java.io.IOException
- if there is either an underlying I/O problem or encoding issue at format layer
-
-