![]() |
VOOZH | about |
PredicateFormat Class
Namespace: Json.Schema
Inheritance: PredicateFormat 🡒 Format 🡒 object
A Json.Schema.Format that uses a predicate for evaluation.
| Name | Type | Summary |
|---|---|---|
| Key | string | The format key. |
Creates a new Json.Schema.PredicateFormat.
1
public PredicateFormat(string key, Func<JsonElement, bool> predicate)
| Parameter | Type | Description |
|---|---|---|
| key | string | The format key. |
| predicate | Func<JsonElement, bool> | The predicate. |
Creates a new Json.Schema.PredicateFormat.
1
public PredicateFormat(string key, PredicateWithErrorMessage predicate)
| Parameter | Type | Description |
|---|---|---|
| key | string | The format key. |
| predicate | PredicateWithErrorMessage | The predicate. |
Validates an instance against a format and provides an error message.
1
public override bool Validate(JsonElement element, out string errorMessage)
| Parameter | Type | Description |
|---|---|---|
| element | JsonElement | The element to validate. |
| errorMessage | out string |
true. Override to return another value.
A new version of content is available.