code: @Override
      protected D doDeserialize( String key, JsonDeserializationContext ctx ) {
          // TODO could probably find a better way to handle the parsing without try/catch
  
          // Default configuration for serializing keys is using ISO-8601, we try that one first
  
          // in ISO-8601
          try {
              return deserializeDate( ISO_8601_FORMAT.parse( key ) );
          } catch ( IllegalArgumentException e ) {
              // can happen if it's not the correct format
          }
  
          // maybe it's in milliseconds
          try {
              return deserializeMillis( Long.parseLong( key ) );
          } catch ( NumberFormatException e ) {
              // can happen if the key is string-based like an ISO-8601 format
          }
  
          // or in RFC-2822
          try {
              return deserializeDate( RFC_2822_FORMAT.parse( key ) );
          } catch ( IllegalArgumentException e ) {
              // can happen if it's not the correct format
          }
  
          throw new JsonDeserializationException( "Cannot parse the key '" + key + "' as a date" );
      }
docs: {@inheritDoc}