laktak/hjson
PHP library for parsing and generating Hjson (Human JSON). Read relaxed JSON with comments, optional commas, and unquoted keys/strings; stringify back to Hjson. Supports preserving whitespace/comments for round-trip editing. Install via Composer: laktak/hjson.
hjson-js exist for Node.js).For Executives: "This package lets our devs write configurations 10x faster with comments, optional commas, and no quotes—cutting errors and onboarding time. For example, a feature flag file could go from this:
{"flags": {"experimental": true, "rate_limit": 1000}}
To this:
# Feature flags (updated 2025-05-01)
flags:
experimental: true
rate_limit: 1000 # requests/second
Zero learning curve for JSON users, but 30% fewer bugs in testing. Low risk (MIT license, active maintenance), and we can phase it into high-impact areas first."
For Engineering: "HJSON-php gives us:
json_decode() in config files (e.g., config/hjson/flags.hjson).
Use case: Replace YAML in our CLI tool’s config system—developers love it, and we avoid YAML’s quirks. Benchmark shows <1ms overhead vs. JSON for our use case."How can I help you explore Laravel packages today?