draft-ietf-jsonpath-base
draft-ietf-jsonpath-base copied to clipboard
Function to get JSON type
This StackOverflow question needs the ability to isolate values of a given type. I think this would make a good function.
$.foo[?type(@)=='object']
The function would return a string (one of object
, array
, number
, string
, boolean
, null
) that indicates the value type of the parameter, which is a ValueType
.
Not sure if true
and false
should be combined into boolean
or not. Technically, these are merely tokens, not actual "boolean" values, though the association is strong.