Package dev.hilla

Class ByteArrayModule

  • All Implemented Interfaces:
    com.fasterxml.jackson.core.Versioned, Serializable

    public class ByteArrayModule
    extends com.fasterxml.jackson.databind.module.SimpleModule
    A Jackson 2 module to allow for the registration of a custom serializer and deserializer for byte[]. By default, Jackson converts byte arrays to base64 string. In contrast, Hilla promises to send and receive byte[] as an array of numbers on the client-side. The custom serializer and deserializer of this class ensures that Java byte[] are indeed treated as array of numbers.
    See Also:
    Serialized Form
    • Nested Class Summary

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

        com.fasterxml.jackson.databind.Module.SetupContext
    • Field Summary

      • Fields inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        _abstractTypes, _deserializerModifier, _deserializers, _hasExplicitName, _keyDeserializers, _keySerializers, _mixins, _name, _namingStrategy, _serializerModifier, _serializers, _subtypes, _valueInstantiators, _version
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteArrayModule()  
    • Method Summary

      • Methods inherited from class com.fasterxml.jackson.databind.module.SimpleModule

        _checkNotNull, addAbstractTypeMapping, addDeserializer, addKeyDeserializer, addKeySerializer, addSerializer, addSerializer, addValueInstantiator, getModuleName, getTypeId, registerSubtypes, registerSubtypes, registerSubtypes, setAbstractTypes, setDeserializerModifier, setDeserializers, setKeyDeserializers, setKeySerializers, setMixInAnnotation, setNamingStrategy, setSerializerModifier, setSerializers, setupModule, setValueInstantiators, version
      • Methods inherited from class com.fasterxml.jackson.databind.Module

        getDependencies
    • Constructor Detail

      • ByteArrayModule

        public ByteArrayModule()