Closed auguwu closed 4 months ago
Currently, only hcl::Body
implements the special handling - all other structures are deserialized according to hcl-json-spec (including hcl::Block
)
If you remove Deserialize
then you can see where this is used internally. Should be possible to rewrite this. However it seems to be easier to deserialize into hcl::Body
as documented and extract the Block from there.
That seems reasonable, thanks :)
With the following code:
receives this error:
when, it should be successful with the following structure:
Since it derives
Deserialize
, I guess the implementation is wrong or is this intended behaviour?https://github.com/martinohmann/hcl-rs/blob/8349bdd12df96b47d5d7f0bc9ce988dc03c57fb6/crates/hcl-rs/src/structure/block.rs#L18-L19