Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

JSONParser.md

34 lines503 Bytes

1---
2id: JSONParser
3title: JSONParser
4---
5​
6Defined in: packages/ai/src/activities/chat/stream/json-parser.ts:12
7​
8JSON Parser interface - allows for custom parser implementations
9​
10## Properties
11​
12### parse
13​
14```ts
15parse: (jsonString) => any;
16```
17​
18Defined in: packages/ai/src/activities/chat/stream/json-parser.ts:18
19​
20Parse a JSON string (may be incomplete/partial)
21​
22#### Parameters
23​
24##### jsonString
25​
26`string`
27​
28The JSON string to parse
29​
30#### Returns
31​
32`any`
33​
34The parsed object, or undefined if parsing fails