ietf-wg-jsonpath / draft-ietf-jsonpath-base

Development of a JSONPath internet draft
https://ietf-wg-jsonpath.github.io/draft-ietf-jsonpath-base/
Other
58 stars 20 forks source link

Function extension access to node location #324

Closed glyn closed 1 year ago

glyn commented 1 year ago

Function extensions can take arguments of kind nodelist. May a function extension make use of a node's location?

If so, it may be possible to define an index_or_member_name() function.

If not, we need to say so in the spec.

gregsdennis commented 1 year ago

This would also require implementations to support returning locations rather than merely node values.

glyn commented 1 year ago

This would also require implementations to support returning locations rather than merely node values.

This is already the case. Function extensions can return nodelists which consist of nodes, each of which has a location and a value. The spec doesn't talk about function extensions returning node values: they either return a nodelist or a value.

glyn commented 1 year ago

I think this issue can be closed now. I think there are enough details to avoid people getting the wrong idea.