diff --git a/pkg/rpc/stack_param.go b/pkg/rpc/stack_param.go index 907e3e885..cf7e4c72c 100644 --- a/pkg/rpc/stack_param.go +++ b/pkg/rpc/stack_param.go @@ -89,6 +89,11 @@ func StackParamTypeFromString(s string) (StackParamType, error) { } } +// MarshalJSON implements the json.Marshaler interface. +func (t *StackParamType) MarshalJSON() ([]byte, error) { + return []byte(`"` + t.String() + `"`), nil +} + // UnmarshalJSON sets StackParamType from JSON-encoded data. func (t *StackParamType) UnmarshalJSON(data []byte) (err error) { var (