Class JsonMissingFieldException

All Implemented Interfaces:
Serializable, JsonException

public final class JsonMissingFieldException extends JsonRuntimeException
Thrown if an expected JSON field is not in the JSON.
See Also:
  • Field Details

  • Constructor Details

    • JsonMissingFieldException

      public JsonMissingFieldException(CharSequence key)
      Constructs a new JsonMissingFieldException object for the specified JSON key or pointer.
      Parameters:
      key - JsonKey or JsonPointer which refers to the missing field.
    • JsonMissingFieldException

      public JsonMissingFieldException(JsonFieldDefinition<?> fieldDefinition)
      Constructs a new JsonMissingFieldException object for the JsonPointer of the specified JsonFieldDefinition.
      Parameters:
      fieldDefinition - provides the JsonPointer which refers to the missing field.
      Throws:
      NullPointerException - if jsonFieldDefinition is null.
  • Method Details

    • newBuilder

      public static JsonMissingFieldException.Builder newBuilder()
      Returns a builder for fluently creating instances of JsonMissingFieldExceptions..
      Returns:
      a new builder for JsonMissingFieldException objects.