Class ObjectKeySerializer

java.lang.Object
org.dominokit.jacksonapt.ser.map.key.KeySerializer<java.lang.Object>
org.dominokit.jacksonapt.ser.map.key.ObjectKeySerializer

public final class ObjectKeySerializer
extends KeySerializer<java.lang.Object>
Default KeySerializer implementation for Object.
Version:
$Id: $
Author:
Nicolas Morel
  • Method Summary

    Modifier and Type Method Description
    protected java.lang.String doSerialize​(java.lang.Object value, JsonSerializationContext ctx)
    Serializes a non-null object into a String to use as map's key.
    static ObjectKeySerializer getInstance()
    getInstance

    Methods inherited from class org.dominokit.jacksonapt.ser.map.key.KeySerializer

    mustBeEscaped, serialize

    Methods inherited from class java.lang.Object

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

    • getInstance

      public static ObjectKeySerializer getInstance()

      getInstance

      Returns:
      an instance of ObjectKeySerializer
    • doSerialize

      protected java.lang.String doSerialize​(java.lang.Object value, JsonSerializationContext ctx)
      Serializes a non-null object into a String to use as map's key.
      Specified by:
      doSerialize in class KeySerializer<java.lang.Object>
      Parameters:
      value - Object to serialize
      ctx - Context for the full serialization process
      Returns:
      the key