JSON Whisperer: Efficient JSON Editing with LLMs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Duanis, Sarel, Greenstein-Messica, Asnat, Habba, Eliya
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912631308156928
author Duanis, Sarel
Greenstein-Messica, Asnat
Habba, Eliya
author_facet Duanis, Sarel
Greenstein-Messica, Asnat
Habba, Eliya
contents Large language models (LLMs) can modify JSON documents through natural language commands, but current approaches regenerate entire structures for each edit, resulting in computational inefficiency. We present JSON Whisperer, a framework that enables LLMs to generate RFC 6902 diff patches-expressing only the necessary modifications-rather than complete documents. We identify two key challenges in patch-based editing: (1) LLMs often miss related updates when generating isolated patches, and (2) array manipulations require tracking index shifts across operations, which LLMs handle poorly. To address these issues, we introduce EASE (Explicitly Addressed Sequence Encoding), which transforms arrays into dictionaries with stable keys, eliminating index arithmetic complexities. Our evaluation shows that patch generation with EASE reduces token usage by 31% while maintaining edit quality within 5% of full regeneration with particular gains for complex instructions and list manipulations. The dataset is available at: https://github.com/emnlp2025/JSON-Whisperer/
format Preprint
id arxiv_https___arxiv_org_abs_2510_04717
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle JSON Whisperer: Efficient JSON Editing with LLMs
Duanis, Sarel
Greenstein-Messica, Asnat
Habba, Eliya
Computation and Language
Large language models (LLMs) can modify JSON documents through natural language commands, but current approaches regenerate entire structures for each edit, resulting in computational inefficiency. We present JSON Whisperer, a framework that enables LLMs to generate RFC 6902 diff patches-expressing only the necessary modifications-rather than complete documents. We identify two key challenges in patch-based editing: (1) LLMs often miss related updates when generating isolated patches, and (2) array manipulations require tracking index shifts across operations, which LLMs handle poorly. To address these issues, we introduce EASE (Explicitly Addressed Sequence Encoding), which transforms arrays into dictionaries with stable keys, eliminating index arithmetic complexities. Our evaluation shows that patch generation with EASE reduces token usage by 31% while maintaining edit quality within 5% of full regeneration with particular gains for complex instructions and list manipulations. The dataset is available at: https://github.com/emnlp2025/JSON-Whisperer/
title JSON Whisperer: Efficient JSON Editing with LLMs
topic Computation and Language
url https://arxiv.org/abs/2510.04717