draft-ietf-jsonpath-base icon indicating copy to clipboard operation
draft-ietf-jsonpath-base copied to clipboard

Function to get JSON type

Open gregsdennis opened this issue 1 year ago • 4 comments

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.

gregsdennis avatar Jul 09 '23 09:07 gregsdennis