Implementation

To use Hjson in your application you have two options

Your users do not need to convert their existing JSON configs and can upgrade (or not) as they like.

Packages for Developers

PlatformSourcePackage
JavaScript, Node.js & Browserhjson-jsNPM version
C#, .Nethjson-csnuget version
C++hjson-cppC++
Gohjson-goGo Pkg
Javahjson-javaMaven Central
Luahjson-luaLuaRocks
PHPhjson-phpPackagist
Pythonhjson-pyPyPI version
Rusthjson-rustcrate

Also see tools and editor support.

Partial implementations

PlatformDescriptionSource/Package
Cjzon variant, based on Hjsonjzon-c
Kotlindoes not pass all testskotlin.hjson
RakuDeserialization onlyJSON::Hjson cpan
RubyHjson Ruby parserhjson-rb gem
RustDeserialization onlydeser-hjson crate

Please open an issue if you port Hjson to another platform/language.

Tools with native support

NameLinkDetails
any-json: convert (almost) anything to JSONNPM versionsee readme
gulp: the streaming build systemNPM versionsee readme
grunt: the JavaScript task runnerNPM versionsee readme
hjsonify: a browserify transform to require Hjson filesNPM versionsee readme
node-config: node.js application configurationNPM versionsee wiki
nconf: hierarchical node.js configurationNPM versionnconf.file({ file: 'file.hjson',
format: require('hjson').rt });
// round trips your comments
rc: non-configurable configuration loader for lazy people.NPM versionvar conf=require('rc')('appname', {/*defaults*/},
null, require('hjson').parse);
Users Developers Syntax Try FAQ Feedback History