PartialJson
Namespace: Vercel.AI.Util
public static class PartialJsonParses complete JSON, or JSON repaired by FixJson.
Inheritance: object
Fields
Section titled “Fields”FailedParse
Section titled “FailedParse”public const string FailedParse = "failed-parse"Neither the original nor the repaired text parsed.
Value: string
RepairedParse
Section titled “RepairedParse”public const string RepairedParse = "repaired-parse"The original text failed and the repaired text parsed.
Value: string
SuccessfulParse
Section titled “SuccessfulParse”public const string SuccessfulParse = "successful-parse"The original text parsed.
Value: string
UndefinedInput
Section titled “UndefinedInput”public const string UndefinedInput = "undefined-input"Input was null, the JavaScript undefined case.
Value: string
Methods
Section titled “Methods”Parse(string?)
Section titled “Parse(string?)”public static PartialJsonResult Parse(string? jsonText)Parses <code class=“paramref”>jsonText</code>. A null argument is undefined input and is not parsed.
Parameters
| Name | Type | Description |
|---|---|---|
jsonText |
string |
Returns: PartialJsonResult
ParseAsync(string?)
Section titled “ParseAsync(string?)”public static Task<PartialJsonResult> ParseAsync(string? jsonText)Parses <code class=“paramref”>jsonText</code>. A null argument is undefined input and is not parsed.
Parameters
| Name | Type | Description |
|---|---|---|
jsonText |
string |
Returns: Task<PartialJsonResult>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product