Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
Simon Willison · 2026/8/3 04:56:26
condense-json 1.1
AI 中文解读
condense-json 1.1来了!这次升级让这个JSON处理工具变得更聪明了——不仅能替换文字,还能处理复杂的合并操作,就像给数据压缩装上了"智能拼图"。简单说,旧版工具只能做简单的字符串替换,现在它能识别结构相似的重复代码块,自动帮你"合并同类项",大幅减少AI生成的数据量。这让AI跑得更快、更省钱,尤其对开发者和使用AI工具的人很友好。虽然普通人平时感觉不到它的存在,但当你用AI聊天、写代码或处理文档时,背后就是这类工具在帮你提速。这次更新还加了自动测试,确保压缩和解压不会出错,用起来更放心了。
<p><strong>Release:</strong> <a href="https://github.com/simonw/condense-json/releases/tag/1.1">condense-json 1.1</a></p>
<p>After shipping <a href="https://simonwillison.net/2026/Aug/2/condense-json/">condense-json 1.0</a> I started integrating it into LLM, and found there were some desirable new features already:</p>
<blockquote>
<ul>
<li>Replacements object can now include values other than strings. These will be identified and used as structural replacements by <code>condense_json()</code> and <code>uncondense_json()</code>. <a href="https://github.com/simonw/condense-json/pull/8">#8</a></li>
<li>Objects can be used as the basis for merge operations. <code>condense_json()</code> will identify if there are objects that are a close match and will store instructions for keys to update or delete. <code>uncondense_json()</code> can then apply these merges.</li>
</ul>
</blockquote>
<p>I also added <a href="https://github.com/simonw/condense-json/blob/1.1/tests/test_properties.py">some round-trip tests</a> using the <a href="https://hypothesis.readthedocs.io/">Hypothesis</a> property-based Python testing library.</p>
<p>Tags: <a href="https://simonwillison.net/tags/json">json</a></p>
分享
阅读原文 ↗