diff options
author | NeonXP <i@neonxp.dev> | 2022-11-16 05:11:19 +0300 |
---|---|---|
committer | NeonXP <i@neonxp.dev> | 2022-11-16 05:11:19 +0300 |
commit | a321bfe7b2f6db5078de7b2e5ed5ddcccd65f319 (patch) | |
tree | d11c187bceee610a7843463949df128569142680 /model/types.go |
initial commit
Diffstat (limited to 'model/types.go')
-rw-r--r-- | model/types.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/model/types.go b/model/types.go new file mode 100644 index 0000000..10e60fa --- /dev/null +++ b/model/types.go @@ -0,0 +1,20 @@ +package model + +type NodeType string + +const ( + StringNode NodeType = "string" + NumberNode NodeType = "number" + ObjectNode NodeType = "object" + ArrayNode NodeType = "array" + BooleanNode NodeType = "boolean" + NullNode NodeType = "null" +) + +type NodeObjectValue map[string]*Node + +func (n NodeObjectValue) Set(k string, v any) { + n[k] = NewNode(v) +} + +type NodeArrayValue []*Node |