This website requires JavaScript.
Explore
Help
Sign In
go
/
hcl
Watch
2
Star
0
Fork
0
You've already forked hcl
Code
Issues
Pull Requests
Releases
Wiki
Activity
5eb0f21a30
hcl
/
test-fixtures
/
structure2.json
11 lines
93 B
JSON
Raw
Normal View
History
Unescape
Escape
structure2 test
2014-08-03 05:18:39 +00:00
{
Decode into proper arrays of things, add many test cases /cc @armon - This changes how Consul has to define its structure. Ping me tomorrow to learn more, but going to leave it here for reference too: The Consul case (there is a test case) never worked even with go-libucl, because there is an ambiguity of whether you want the inner children or the array of outer elements (the slice in the Policy struct). I've added a new modifier you can specify with a tag called "expand" which will tell hcl to expand the value to its children for decoding. You can see me use it in the test case which verifies that the Consul ACLs parse.
2014-08-18 06:49:10 +00:00
"foo"
:
[
{
Tests pass.
2014-08-12 03:58:20 +00:00
"baz"
:
{
structure2 test
2014-08-03 05:18:39 +00:00
"key"
:
7
,
"foo"
:
"bar"
Decode into proper arrays of things, add many test cases /cc @armon - This changes how Consul has to define its structure. Ping me tomorrow to learn more, but going to leave it here for reference too: The Consul case (there is a test case) never worked even with go-libucl, because there is an ambiguity of whether you want the inner children or the array of outer elements (the slice in the Policy struct). I've added a new modifier you can specify with a tag called "expand" which will tell hcl to expand the value to its children for decoding. You can see me use it in the test case which verifies that the Consul ACLs parse.
2014-08-18 06:49:10 +00:00
}
}
,
{
structure2 test
2014-08-03 05:18:39 +00:00
"key"
:
7
Decode into proper arrays of things, add many test cases /cc @armon - This changes how Consul has to define its structure. Ping me tomorrow to learn more, but going to leave it here for reference too: The Consul case (there is a test case) never worked even with go-libucl, because there is an ambiguity of whether you want the inner children or the array of outer elements (the slice in the Policy struct). I've added a new modifier you can specify with a tag called "expand" which will tell hcl to expand the value to its children for decoding. You can see me use it in the test case which verifies that the Consul ACLs parse.
2014-08-18 06:49:10 +00:00
}
]
structure2 test
2014-08-03 05:18:39 +00:00
}
Reference in New Issue
Copy Permalink