{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/6"}],"enrichment":{"capability":"Condense JSON by replacing repeated strings and structural patterns with compact references, then expand them back to their original form.","skillfed_tags":["json-compression","data-deduplication"],"use_cases":["Reduce payload size when transmitting repetitive JSON (e.g., API responses with duplicate schemas or tool definitions).","Compress JSON logs or structured data with common patterns to save storage or bandwidth.","Deduplicate embedded JSON blobs that appear in multiple places with minor variations.","Minimize JSON sent to language models or other services where token count or size matters.","Archive or cache JSON while preserving exact round-trip fidelity."],"what_it_does":"condense-json provides two functions to reduce JSON size by identifying and replacing repeated content. The `condense_json` function scans a JSON-like object for strings that contain replacement substrings, dicts and lists that match replacement structures exactly, and dicts that are close to a replacement base (stored as base plus a patch). Each match is replaced with a compact reference marker. The `uncondense_json` function reverses this, restoring the original JSON from the condensed form.\n\nThe package handles three reference types: whole-value matches (`{\"$\": id}`), strings containing multiple replacements (`{\"$r\": [segments]}`), and dicts stored as a base plus a patch. Matching is deterministic\u2014longest substring wins when patterns overlap\u2014and round-tripping is guaranteed: `uncondense_json(condense_json(obj, r), r) == obj` always holds. It requires Python 3.10+ and has no external dependencies.","worth_installing":"Yes. The package is lightweight, actively maintained, has no dependencies, and solves a specific problem well\u2014reducing JSON size through deterministic pattern replacement with guaranteed round-tripping. The Apache-2.0 license is permissive. Install if you need to compress repetitive JSON or deduplicate structural patterns; skip if your JSON is already sparse or you need byte-identical serialization."},"id":"condense-json","links":{"html":"https://skillfed.io/packages/condense-json","md":"https://skillfed.io/packages/condense-json.md","pypi":"https://pypi.org/project/condense-json/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-03","license_spdx":"Apache-2.0","license_treatment":"permissive","name":"condense-json","python_support":"supports_current","summary":"Python function for condensing JSON using replacement strings"},"popularity":{"monthly_downloads":456382,"position":6555,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.1"}
