-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean type #264
Comments
The layout and ordering of each
This is required in order to provide structured ordering when comparing You can see how it's used in the Less function here: https://github.com/tidwall/gjson/blob/master/gjson.go#L2059-L2082 The original design of gjson, and this feature specifically, was for the purpose of efficient indexing of json values in a buntdb database.
It may be possible, but it would likely break compatibility. Perhaps an alternative option would be to create a helper function: func (t Result) IsBool() bool {
return t.Type == gjson.True || t.Type == gjson.False
} |
Hmm, alright, I think that the |
I was incredibly surprised to see that there was no
gjson.Boolean
type to checkgjson.Type
against.Instead, there's a
True
"type" and aFalse
"type", which to me seem to be no "types" at all.Could those two be collated into a "boolean" type?
The text was updated successfully, but these errors were encountered: