FixJson
Namespace: Vercel.AI.Util
public static class FixJsonRepairs truncated JSON by scanning once and closing open strings, literals, arrays, and objects.
Inheritance: object
Methods
Section titled “Methods”Repair(string?)
Section titled “Repair(string?)”public static string Repair(string? input)Returns <code class=“paramref”>input</code> with truncated JSON closed enough for a standard parser.
Parameters
| Name | Type | Description |
|---|---|---|
input |
string |
Returns: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product