full-json-extractor
Version:
Brute-forces all possible highest-level json candidates with pruning to keep performance fast with reasonable payload < 1MB
10 lines • 539 B
TypeScript
import { Limit } from "./interfaces";
/**
* Extracts json objects from a given input string
* @param input input string
* @param limit Sets pre-check behavior. If set to 'log2', method will terminate pre-check after reaching log2(n) characters. Useful for malformed data i.e. many {}
* Else, will do a O(n) scan to coarsely validate brace matches. Useful for many json objects (i.e. early termination)
* @returns
*/
export declare function extractJsons(input: string, limit?: Limit): object[];
//# sourceMappingURL=extractor.d.ts.map