libucl
libucl copied to clipboard
Parse error when including JSON
The following simple JSON file can't be included:
$ cat test.json
{
"key": "value"
}
$ cat top.ucl
.include "./test.json"
$ ucl_tool -i top.ucl -f json
Failed to parse input file: .../test.json:3 object closed with } is not opened with { at line 1
If I remove the bottom brace from test.json, or both the top and bottom braces, it works:
$ cat test.json
{
"key": "value"
$ ucl_tool -i top.ucl -f json
{
"key": "value"
}
$ cat test.json
"key": "value"
$ ucl_tool -i top.ucl -f json
{
"key": "value"
}
I'm using libucl 0.8.2:
$ nix-store -qR `which ucl_tool` | grep libucl
/nix/store/ahcwqg33s5m9xj5s2iv6cbhwi3glxyds-libucl-0.8.2
In version 0.8.1 I don't see this issue.