Unquoted strings
A sequence of characters outside of a quoted string is a string value if:
it does not contain "forbidden characters": '$', '"', '{', '}', '[', ']', ':', '=', ',', '+', '#', '`', '^', '?', '!', '@', '*', '&', '' (backslash), or whitespace.
it does not contain the two-character string "//" (which starts a comment)
its initial characters do not parse as true, false, null, or a number.
String value concatenation
...
So for example foo bar baz parses as three unquoted strings, and the three are value-concatenated into one string. The inner whitespace is kept and the leading and trailing whitespace is trimmed. The equivalent string, written in quoted form, would be "foo bar baz".
The unquoted strings are valid to contain the ..
Also, the one two is valid too.
Example config and code:
https://go.dev/play/p/oO5cGGJ4RiF
Errors:
From the spec: https://github.com/lightbend/config/blob/main/HOCON.md#unquoted-strings https://github.com/lightbend/config/blob/main/HOCON.md#string-value-concatenation
The unquoted strings are valid to contain the
.
. Also, theone two
is valid too.This config works in other Hocon libraries and here too: https://hocon-playground.herokuapp.com/