HJSON (Human JSON)-Spezifikation
HJSON ist ein syntax für humans, allowing comments, unquoted Zeichenketten, und multiline Werte während remaining JSON-compatible.
Human-Friendly Syntax
HJSON eliminates the need for quotes on most strings and commas between elements. Comments are supported with # and // styles. Multiline strings use triple quotes or indented blocks. The format prioritizes readability for configuration files. HJSON can be losslessly converted to and from standard JSON.
- no quotes
- Unquoted strings
- no commas
- Omit separators
- multiline
- Triple-quote or indent
value: hello newline separated """...""" Conversion and Tooling
HJSON parsers convert to standard JSON for processing, preserving all data. Round-trip conversion maintains comments and formatting when using HJSON-native tools. The format is used in configuration for Node.js and Python projects. HJSON is not a data interchange format but a human authoring format. Tools exist for syntax highlighting in major editors.
- to JSON
- Lossless conversion
- round-trip
- Preserves comments
- editors
- VS Code, Vim, etc.
hjson -c HJSON native syntax support