Skip to content
uencoder

HJSON Comments

HJSON (Human JSON) allows # and // comments, unquoted keys and values, and multiline strings, designed for humans editing configuration.

Purpose

To make JSON configuration easier to edit by hand, supporting comments and relaxed syntax, and to parse it back into standard JSON.

Mechanism

Keys may be unquoted (identifiers); values may be unquoted (up to the end of line); # or // comments; triple-quote multiline strings; trailing commas allowed. It parses into standard JSON values.

Use cases

  • Manual configuration editing
  • Annotating JSON configuration
  • User preference files

Related tools

References