Docs
Code Rabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
Sentry
Prisma
Strapi
Unkey
UI.dev
Code Rabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
Sentry
Prisma
Strapi
Unkey
UI.dev
Class References
Function References
Interface References
Type Alias References
Variable References
Class References

PartialJSONParser

Class: PartialJSONParser

Defined in: activities/chat/stream/json-parser.ts:25

Partial JSON Parser implementation using the partial-json library This parser can handle incomplete JSON strings during streaming

Implements

Constructors

Constructor

ts
new PartialJSONParser(): PartialJSONParser;
new PartialJSONParser(): PartialJSONParser;

Returns

PartialJSONParser

Methods

parse()

ts
parse(jsonString): any;
parse(jsonString): any;

Defined in: activities/chat/stream/json-parser.ts:31

Parse a potentially incomplete JSON string

Parameters

jsonString

string

The JSON string to parse (may be incomplete)

Returns

any

The parsed object, or undefined if parsing fails

Implementation of

JSONParser.parse