condense-json 1.1能让JSON压缩更智能,支持对象合并和结构化替换,处理复杂数据时比纯字符串替换强不少。
condense-json 1.1版本发布,在前一版1.0基础上新增两项功能:替换对象的值不再局限于字符串,condense_json()和uncondense_json()可识别并执行结构化替换。此外,对象可作为合并操作的基础,condense_json()能识别近似匹配的对象并记录键的更新或删除指令,uncondense_json()可应用这些合并。新版还引入了基于Hypothesis属性测试库的往返测试。
condense-json 1.1
Release: condense-json 1.1 After shipping condense-json 1.0 I started integrating it into LLM, and found there were some desirable new features already: Replacements object can now include values other than strings. These will be identified and used as structural replacements by condense_json() and uncondense_json() . #8 Objects can be used as the basis for merge operations. condense_json() will identify if there are objects that are a close match and will store instructions for keys to update or delete. uncondense_json() can then apply these merges. I also added some round-trip tests using the Hypothesis property-based Python testing library. Tags: json