A two-way JSON minifier that compresses JSON by replacing long property keys with short aliases defined in a mapping object. Version 0.0.3 is the latest and only release. It reduces data transfer size and can act as an obfuscator. Unlike gzip compression, this approach is deterministic and preserves the original structure after unminifying. Works on Node.js and in browsers with a custom snippet. No updates since 2015, likely in maintenance mode.
npm install json-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a minifier with a mapping and minify/unminify a simple JSON object.
Ensure no two keys map to the same short alias, and aliases are valid JSON keys.
Provide a mapping that covers all nested property paths, or recursively apply minification.
Consider alternatives like json-bignum or use a custom implementation based on the browser snippet.
Ensure reverseJsonFilters is defined and maps short aliases back to original keys.
Call require('json-minifier')(specs) to get the minifier object.Run npm install json-minifier and require correctly. In browser, use the provided snippet instead.
No dependency data recorded yet.