create JSON strings larger than 512MB in javascript
- big-json
- json-stream-stringify
- json-stream-es
har-json-stringifyis a custom serializer for HAR data. surprisingly, this is slower than the general-purpose solutions
- JSONStream - throws
RangeError: Invalid string length - concatjson - throws
RangeError: Invalid string length - ndjson - only works for newline-delimited JSON
- stream-json -
JSON.parseonly
- JSON.stringify fails after 1.052 seconds
- big-json done after 1.52 seconds
- json-stream-stringify done after 1.917 seconds
- json-stream-es done after 2.076 seconds
- har-json-stringify done after 2.048 seconds
- also verify correct JSON output by piping to jq
- benchmark different types of data, for example deeply-nested arrays