Class UUIDSerializer

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

    public class UUIDSerializer
    extends com.fasterxml.jackson.databind.JsonSerializer<UUID>
    A simple serializer for Java UUIDs which prevents the regular Java data type from being converted to an inefficient string.
    Since:
    2.6.2
    Author:
    Jared Tiala
    • 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
      UUIDSerializer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void serialize​(UUID uuid, com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)  
      • Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

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

      • UUIDSerializer

        public UUIDSerializer()
    • Method Detail

      • serialize

        public void serialize​(UUID uuid,
                              com.fasterxml.jackson.core.JsonGenerator jgen,
                              com.fasterxml.jackson.databind.SerializerProvider provider)
                       throws IOException
        Specified by:
        serialize in class com.fasterxml.jackson.databind.JsonSerializer<UUID>
        Throws:
        IOException