code: @Override
      protected String doSerialize( Object value, JsonSerializationContext ctx ) {
          if ( value instanceof Date ) {
              return DateKeySerializer.getInstance().doSerialize( (Date) value, ctx );
          } else {
              return ToStringKeySerializer.getInstance().doSerialize( value, ctx );
          }
      }
docs: {@inheritDoc}