json/model/stringNode.go
2022-11-21 04:31:56 +03:00

14 lines
213 B
Go

package model
type StringNode struct {
Value string
}
func (n StringNode) Type() NodeType {
return StringType
}
func (n *StringNode) MarshalJSON() ([]byte, error) {
return []byte(`"` + n.Value + `"`), nil
}