diff options
Diffstat (limited to 'model/stringNode.go')
-rw-r--r-- | model/stringNode.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/model/stringNode.go b/model/stringNode.go new file mode 100644 index 0000000..afa4023 --- /dev/null +++ b/model/stringNode.go @@ -0,0 +1,13 @@ +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 +} |