code: @Override
      protected String doSerialize( Date value, JsonSerializationContext ctx ) {
          if ( ctx.isWriteDateKeysAsTimestamps() ) {
              return Long.toString( value.getTime() );
          } else {
              return DateFormat.format( value );
          }
      }
docs: {@inheritDoc}