Back to home
Technology

JSON River – Parse JSON incrementally as it streams in

Source

Hacker News

Published

TL;DR

AI Generated

JSON River is a tool that allows for incremental parsing of JSON data as it streams in, suitable for scenarios like network requests or language models. It provides increasingly complete values as the data is received, ensuring correctness by matching JSON.parse behavior and handling invalid input gracefully. The tool maintains invariants such as preserving data types and only modifying arrays and objects in specific ways. While JSON River is small, fast, and dependency-free, it is recommended to use JSON.parse for non-streaming scenarios for better performance. Development details include installation instructions, testing, and linting processes.

Read Full Article

Similar Articles

Firm quietly boosts H.264 streaming license fees from $100,000 up to staggering $4.5 million — backbone codec of the internet gets meteoric increase, AVC hikes follow disastrous H.265 licensing increases

Firm quietly boosts H.264 streaming license fees from $100,000 up to staggering $4.5 million — backbone codec of the internet gets meteoric increase, AVC hikes follow disastrous H.265 licensing increases

Via Licensing Alliance (Via LA) has significantly increased H.264 streaming license fees, with rates now reaching up to $4.5 million annually for large platforms starting in 2026. The fee restructuring follows previous issues with H.265 licensing that led to bans on laptops in Germany. The new fee structure divides platforms by size, with Tier 1 services facing the highest fees. This escalation in codec licensing costs could impact major streaming platforms and consumer devices, potentially leading to significant industry-wide challenges.

Tom's Hardware
Razer Kiyo V2 Review: USB-C required

Razer Kiyo V2 Review: USB-C required

The Razer Kiyo V2 is a 4K webcam priced at $150, offering video capture at various resolutions and frame rates. It features an 8.3MP Sony STARVIS sensor, HDR capabilities, 4x zoom, and built-in stereo microphones. The webcam has a detachable USB-C cable and a built-in privacy shutter, but lacks a lens cap. It comes with a sturdy monitor mount and tripod attachment point. The Kiyo V2 performs well in both well-lit and low-light scenarios, with adjustable settings available through Razer's Synapse software. While it offers good image quality, the requirement for a USB-C port may be inconvenient for some users.

Tom's Hardware
Sony will ship its final Blu-ray recorders this month — exit from Japanese market the end of an era for the segment

Sony will ship its final Blu-ray recorders this month — exit from Japanese market the end of an era for the segment

Sony is discontinuing its Blu-ray disk recorder business in Japan, with the final shipments scheduled for this month. The company ceased manufacturing recorders and discs last year, and the market has been dwindling due to the popularity of streaming services. Despite this exit, Sony will continue to produce Blu-ray players, and the Blu-ray media market remains stable with other manufacturers still offering drives and media options. The Blu-ray format celebrated its 20th anniversary and continues to be a viable option for enthusiasts seeking high-quality video streams.

Tom's Hardware
How to setup an Android smartphone as a webcam — Camo Studio unlocks new uses for old smartphones in Windows 10 or 11 and OBS software

How to setup an Android smartphone as a webcam — Camo Studio unlocks new uses for old smartphones in Windows 10 or 11 and OBS software

Camo Studio allows users to repurpose old Android smartphones as webcams for Windows 10 or 11 and OBS software. The setup process involves installing Camo Studio on a PC and the Camo Camera app on the Android device, then connecting the two over Wi-Fi. Users can adjust camera settings, apply filters, and use templates for a customized video stream. Additionally, the article provides steps for integrating Camo with OBS to create a multi-camera setup for streaming or recording videos.

Tom's Hardware

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.