|
7 | 7 |
|
8 | 8 | A set of utilities designed to extend JSON's capabilities, especially for handling large JSON data (over 100MB) efficiently: |
9 | 9 |
|
10 | | -- **[parseChunked()](#parsechunked)** – Parses JSON incrementally; similar to [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse), but processing JSON data in chunks. |
11 | | -- **[stringifyChunked()](#stringifychunked)** – Converts JavaScript objects to JSON incrementally; similar to [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify), but returns a generator that yields JSON strings in parts. |
12 | | -- **[stringifyInfo()](#stringifyinfo)** – Estimates the size of the `JSON.stringify()` result and identifies circular references without generating the JSON. |
13 | | -- **[parseFromWebStream()](#parsefromwebstream)** – A helper function to parse JSON chunks directly from a Web Stream. |
14 | | -- **[createStringifyWebStream()](#createstringifywebstream)** – A helper function to generate JSON data as a Web Stream. |
| 10 | +- [parseChunked()](#parsechunked) – Parses JSON incrementally; similar to [`JSON.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse), but processing JSON data in chunks. |
| 11 | +- [stringifyChunked()](#stringifychunked) – Converts JavaScript objects to JSON incrementally; similar to [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify), but returns a generator that yields JSON strings in parts. |
| 12 | +- [stringifyInfo()](#stringifyinfo) – Estimates the size of the `JSON.stringify()` result and identifies circular references without generating the JSON. |
| 13 | +- [parseFromWebStream()](#parsefromwebstream) – A helper function to parse JSON chunks directly from a Web Stream. |
| 14 | +- [createStringifyWebStream()](#createstringifywebstream) – A helper function to generate JSON data as a Web Stream. |
15 | 15 |
|
16 | 16 | ### Key Features |
17 | 17 |
|
18 | | -- **Fast and memory-efficient**: Optimized to handle large JSON data with minimal resource usage (see [benchmarks](./benchmarks/README.md)). |
19 | | -- **Broad compatibility**: Works seamlessly with browsers, Node.js, Deno, and Bun. |
20 | | -- **Stream support**: Supports both Node.js and Web streams. |
21 | | -- **Dual package**: Available in both ESM and CommonJS. |
22 | | -- **TypeScript typings**: Included. |
23 | | -- **No dependencies** |
24 | | -- **Compact size**: 8.5Kb (minified), 3.4Kb (min+gzip). |
| 18 | +- Optimized to handle large JSON data with minimal resource usage (see [benchmarks](./benchmarks/README.md)) |
| 19 | +- Works seamlessly with browsers, Node.js, Deno, and Bun |
| 20 | +- Supports both Node.js and Web streams |
| 21 | +- Available in both ESM and CommonJS |
| 22 | +- TypeScript typings included |
| 23 | +- No external dependencies |
| 24 | +- Compact size: 8.5Kb (minified), 3.4Kb (min+gzip) |
25 | 25 |
|
26 | 26 | ### Why json-ext? |
27 | 27 |
|
|
0 commit comments