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

Index selector [-0] #337

Closed LutzBettge closed 1 year ago

LutzBettge commented 1 year ago

According to chapter 2.5.3, using -0 as index is allowed, but no semantics for this is defined (and probably should not be defined). Proposal would be to exclude -0, i.e. replace the line

int = ["-"] ( "0" / (DIGIT1 *DIGIT) ) ; - optional

by

int = ( "0" / ["-"] (DIGIT1 *DIGIT) ) ; - optional

This also makes sense for all other occurrences of "int" in the document.

cabo commented 1 year ago

Very good point. I'll create a PR.