-
Notifications
You must be signed in to change notification settings - Fork 597
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
Q: Simple JSON nested object to HCL #192
Comments
Hi @mgutz Thank you for opening an issue. HCL parses this way because it's possible to have multiple objects like this: hcl {
key = 1
}
hcl {
key = 2
} In this case, which Hope this helps! |
The README says "fully compatible" with JSON. Maybe that should be changed. I was aware of the block case. I thought explicitly using assignment |
Hi @mgutz It is fully-compatible. That HCL maps directly to JSON. |
If you're here because of Consul's HCL config, which at the time of writing is not really documented, it looks like Consul has some code to manually patch up the above behavior, see here. That ends up translating
which normally in HCL corresponds to
into (for Consul specifically)
|
What is the HCL equivalent of this JSON?
I try this
And get
The text was updated successfully, but these errors were encountered: