staticql
Version:
Type-safe query engine for static content including Markdown, YAML, JSON, and more.
13 lines (12 loc) • 394 B
TypeScript
/**
* Parses a JSON string or buffer and returns the corresponding object.
*
* Automatically decodes a Uint8Array using UTF-8 if needed.
*
* @param rawContent - Raw JSON content as string or binary (Uint8Array).
* @returns Parsed JSON object.
* @throws If the input is not valid JSON.
*/
export declare function parseJSON({ rawContent }: {
rawContent: string | Uint8Array;
}): any;