JCON Configuration Format
JCON (JSON for CONfiguration) is a configuration format that supports nested data.
The line-based parser makes it easier for humans to read and edit than regular JSON.
See the Jcon module for parsing methods.
JCON can also be used in a template function.
Features
- No quotation marks for strings
- Separation by newlines, not commas
- Support for comments
- Support for multi-line strings
A Quick Look
{ // This is a comment myKey: { key: this is a string boolean: true list: [ this is item 1 this is item 2 ] multiline: ''' This is a multiline string ''' } }
Annotated Format
// Comments take up one entire line // Wrap the data in a Map or List { // Keys are always un-quoted, separated by a colon // followed by a value or a lone brace myKey: { // Strings are not quoted subKey: this is a string // One key/value per line. No end commas. subKey2: another string // Multiline strings with triple-quote fence. multiKey: ''' This is a multiline string ''' // Lists have one item per line. No end commas. list: [ this is item 1 this is item 2 ] // 'true' and 'false' are converted to Booleans boolean: true // Keys with the 'Url' suffix will be returned as // a UrlTypeString helpUrl: /contact/help // Keys with the 'Lm' suffix are parsed // as Litemark and returned as an HtmlTypeString bodyLm: ''' ## My Favorite Quote > Wherever you go, there you are. ''' // Use backslash to escape characters escapeMe: \{ some text \} } }