Unlike hclsyntax, the json struct is unexported:
Can we make these exported? If possible, I'm going to make a PR.
Background
I'm planning to build a plugin to send and receive structs that satisfy hcl.Expression with go-plugin. However, to handle an interface, we need to gob.Register structs that satisfies it.
hclsyntax is exported, so we can gob.Regitser from outside of the package, but json is not exported, so we cannot avoid the following errors:
16:16:12 server.go:418: rpc: gob error encoding body: gob: type not registered for interface: json.expression
Unlike hclsyntax, the json struct is unexported:
hcl/json/structure.go
Line 14 in 3aa4a2e
hcl/json/structure.go
Line 25 in 3aa4a2e
hcl/json/ast.go
Line 9 in 3aa4a2e
Can we make these exported? If possible, I'm going to make a PR.
Background
I'm planning to build a plugin to send and receive structs that satisfy
hcl.Expressionwith go-plugin. However, to handle an interface, we need togob.Registerstructs that satisfies it.hclsyntax is exported, so we can
gob.Regitserfrom outside of the package, but json is not exported, so we cannot avoid the following errors: