public final class SpecError extends Object
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.
ERROR_CODE
,
JsPath
,
JsError
Modifier and Type | Field and Description |
---|---|
ERROR_CODE |
errorCode
The error code indicating the type of validation error.
|
JsPath |
path
The path where the error occurred within the JSON structure.
|
JsValue |
value
The JSON value that triggered the error.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Checks whether this `SpecError` instance is equal to another object.
|
int |
hashCode()
Computes the hash code of this `SpecError` instance.
|
String |
toString()
Returns a human-readable string representation of the `SpecError` instance.
|
public final JsPath path
public final ERROR_CODE errorCode
public final JsValue value
Copyright © 2023. All rights reserved.