aboutsummaryrefslogtreecommitdiff
path: root/model/booleanNode.go
blob: bc2d60ef6cfae527d5a266b3747ac4073ca1dab4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package model

type BooleanNode struct {
	Value bool
}

func (n BooleanNode) Type() NodeType {
	return BooleanType
}

func (n *BooleanNode) MarshalJSON() ([]byte, error) {
	if n.Value {
		return []byte("true"), nil
	}
	return []byte("false"), nil
}