Skip to content

Request: Make json structs exported #332

@wata727

Description

@wata727

Unlike hclsyntax, the json struct is unexported:

type body struct {

type expression struct {

type node interface {

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions