Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error when including JSON #274

Open
rickynils opened this issue Oct 3, 2023 · 1 comment
Open

Parse error when including JSON #274

rickynils opened this issue Oct 3, 2023 · 1 comment

Comments

@rickynils
Copy link

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
@rickynils
Copy link
Author

In version 0.8.1 I don't see this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant