Hocon, aka Human-Optimized Config Object Notation, is a data notation created in 2011.
#1250on PLDB | 12Years Old |
HOCON, or Human-Optimized Config Object Notation is a format for human-readable data, and a superset of JSON and .properties. It is primarily used in conjunction with the Play framework, and is developed by Lightbend. It is also supported as a configuration format for .NET projects via Akka.NET and Puppet.. Read more on Wikipedia...
// one array
a : [ 1, 2, 3, 4 ]
// two arrays that are concatenated
a : [ 1, 2 ] [ 3, 4 ]
// a later definition referring to an earlier
// (see "self-referential substitutions" below)
a : [ 1, 2 ]
a : ${a} [ 3, 4 ]
Feature | Supported | Token | Example |
---|---|---|---|
Comments | ✓ | // A comment |
|
Line Comments | ✓ | // | // A comment |
Lists | ✓ | [1, 2, 3] |
|
Maps | ✓ | {"name": "Mary"} |
|
Strings | ✓ | "hello world" |
|
Integers | ✓ | 80766866 |
|
Floats | ✓ | 2.3 |
|
Booleans | ✓ | false |
|
Semantic Indentation | X | ||
Case Insensitive Identifiers | X | ||
Multiline Strings | X | ||
File Imports | X | ||
MultiLine Comments | X | ||
Ternary operators | X | ||
Conditionals | X | ||
Macros | X | ||
Disk Output | X |