func (ks keySequence) CheckExistence() keySequence {
	ks2 := ks.clone()
	ks2.checkExistence = true
	return ks2
}
CheckExistence indicates that the ks will be checked for existence,
meaning its endValueType is irrelevant
package meta
import (
	"fmt"
	"strings"
)
type keySequence struct {
	segments       []string
	endValueType   string
	checkExistence bool
}
const (
	object    = "object"
	array     = "array"
	primitive = "primitive"
)
func (ks keySequence) AddObject(key string) keySequence {
	if len(key) <= 0 {
		panic("ks.AddObject called with an empty key")
	}
	return ks.add(strings.ToUpper(key))
}
func (ks keySequence) AddArray() keySequence {
	return ks.add("")
}
func (ks keySequence) EndsWithPrimitiveValue() keySequence {
	return ks.setEndValueType(primitive)
}
func (ks keySequence) EndsWithObject() keySequence {
	return ks.setEndValueType(object)
}
func (ks keySequence) EndsWithArray() keySequence {
	return ks.setEndValueType(array)
}