How to Safely Parse Large Zendesk JSON and NDJSON Exports in the Browser
Zendesk data exports used for audits and migrations often come in NDJSON format — one JSON object per line — rather than a single standard JSON document, which requires special handling. A developer recently built a browser-local viewer that addresses key parsing challenges, including fallback logic that attempts full JSON parsing before falling back line-by-line and counting malformed records instead of discarding the file. For large files, the browser's File API and a TextDecoder are used together to stream data in chunks, preserving incomplete lines between reads to avoid data loss. Web Workers are recommended to offload parsing, decompression, and indexing tasks off the main thread, keeping the UI responsive and allowing clean cancellation. Because Zendesk exports vary in structure — wrapping tickets in different container shapes like 'results', 'data', or 'tickets' — parsers must normalize records and surface unsupported formats as warnings rather than silently dropping data.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in