SShortSingh.
Back to feed

How to Safely Parse Large Zendesk JSON and NDJSON Exports in the Browser

0
·1 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

How Token Counts Can Expose Silent Failures in LLM Agents Returning HTTP 200

AI agents can return a successful HTTP 200 status with no errors in logs, yet produce no usable output — a phenomenon known as a silent failure. This occurs when a model triggers a refusal policy, generates whitespace, or successfully describes a failed tool call instead of returning expected data. Standard observability tools typically monitor HTTP status codes and miss these output-level failures entirely. Developers can detect such failures by cross-referencing output token counts with actual response content length, since a near-zero or mismatched token count signals something went wrong after the API call succeeded. A simple heuristic function comparing token spend against response content can flag these silent failures before they corrupt downstream pipelines or silently skip critical actions.

0
ProgrammingDEV Community ·

Developer Uses Claude AI to Cut Smart Contract Coding and Review Time

A software engineer with 20 years of experience across banking, blockchain, and digital forensics has detailed how he integrates Claude AI into his daily development workflow. He uses the AI tool as a pair programmer to generate boilerplate Rust code for Soroban smart contracts on the Stellar blockchain, reducing scaffolding work from a full day to roughly two hours. The engineer also employs Claude for adversarial security reviews, where it reportedly identified an integer overflow vulnerability in a reward-distribution loop that static analysis tools had missed. He applies strict prompt constraints — such as banning unwrap() calls — to ensure generated code meets production standards, which he says cut initial review cycles by about 40% across his last three projects. Additionally, he uses Claude to produce audience-tailored documentation, generating both business-facing and technical write-ups from a single code source.

0
ProgrammingDEV Community ·

LoRA-Based Preference Tuning Optimizes Style Over Reasoning, Researchers Warn

A technical analysis published on DEV Community argues that using low-rank adapters (LoRA) for preference optimization methods like DPO systematically biases language models toward superficial stylistic changes rather than genuine reasoning improvements. Because the low-rank constraint limits the update to a narrow subspace, the optimizer defaults to the cheapest signal separating good from bad outputs — typically tone, formatting, and hedging phrases. Full-rank fine-tuning can spread gradient signals across more independent directions, enabling deeper reasoning changes, but it remains computationally expensive and is rarely used in practice. The analysis warns that distilling from a LoRA-DPO model compounds the problem by permanently encoding these shortcuts into student models. The proposed remedy is not collecting more data but reconsidering how rank budget is allocated across the model's layers during preference tuning.

0
ProgrammingDEV Community ·

Smartphone AI Pentesting Agent Can Flag Subdomain Takeover Risks Using WHOIS API

A local AI pentesting tool called Nightcrawler, designed to run entirely on a smartphone without cloud resources, has sparked interest in the cybersecurity community for its pocket-sized offensive-security capabilities. However, phone-based large language models lack the computing power to run full subdomain enumeration and DNS resolution pipelines independently. A proposed solution involves routing reconnaissance tasks to a lightweight backend API, specifically a Domain WHOIS API that bundles RDAP data, DNS records, SSL metadata, subdomain discovery, and takeover-risk scoring into a single JSON response. Subdomain takeover — where attackers claim dangling DNS records pointing to defunct services like GitHub Pages or Heroku — is considered a high-impact, low-complexity vulnerability commonly targeted in bug bounty programs. By offloading the heavy data gathering to the API, the on-device LLM only needs to reason over structured results and surface actionable findings to the user.

How to Safely Parse Large Zendesk JSON and NDJSON Exports in the Browser · ShortSingh