JsonSchemaValidator
Namespace: Vercel.AI.ProviderUtils
public static class JsonSchemaValidatorApplies a JSON Schema document. Unknown object properties are dropped.
Inheritance: object
Methods
Section titled “Methods”TryApply(JsonElement, JsonNode, out JsonElement, out string?)
Section titled “TryApply(JsonElement, JsonNode, out JsonElement, out string?)”public static bool TryApply(JsonElement value, JsonNode schema, out JsonElement projected, out string? error)Projects <code class=“paramref”>value</code> through <code class=“paramref”>schema</code>.
Parameters
| Name | Type | Description |
|---|---|---|
value |
JsonElement | |
schema |
JsonNode | |
projected |
JsonElement | |
error |
string |
Returns: bool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product