Skip to content

PartialJson

Namespace: Vercel.AI.Util

public static class PartialJson

Parses complete JSON, or JSON repaired by FixJson.

Inheritance: object

View source

public const string FailedParse = "failed-parse"

Neither the original nor the repaired text parsed.

Value: string

View source

public const string RepairedParse = "repaired-parse"

The original text failed and the repaired text parsed.

Value: string

View source

public const string SuccessfulParse = "successful-parse"

The original text parsed.

Value: string

View source

public const string UndefinedInput = "undefined-input"

Input was null, the JavaScript undefined case.

Value: string

View source

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

View source

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>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product