java.lang.Object
jsonvalues.spec.SpecError
The `SpecError` class represents an error that occurs during the validation of a JSON value against a
specification. It encapsulates information about the error, including the path where the error occurred,
the error code, and the value that triggered the error.
json-values and json-specs in particular, uses `SpecError` instances to report validation errors when a JSON value does not conform to the specified rules and constraints.
Instances of this class are immutable and provide methods for creating and working with validation errors.
The `SpecError` class offers the following key functionality: - Generating a human-readable string representation of the error for debugging and logging purposes. - Implementing equality and hash code methods to compare error instances.
- See Also:
-
Field Summary
Fields -
Method Summary
-
Field Details
-
path
The path where the error occurred within the JSON structure. -
errorCode
The error code indicating the type of validation error. -
value
The JSON value that triggered the error.
-
-
Method Details
-
toString
Returns a human-readable string representation of the `SpecError` instance. -
equals
Checks whether this `SpecError` instance is equal to another object. -
hashCode
public int hashCode()Computes the hash code of this `SpecError` instance.
-