You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In working on #626, it has become apparent that the lack of distinction that is made between a.[] and a is problematic. It's a subtle difference, but the former should locate the contents of the array at a, whereas the latter should locate the array itself.
The first test passes but the second test fails. It fails because the resolved type is ARRAY rather than VARIES.
When a payload is an array at the top level, [] is currently used to locate that array. To correct the behaviour of the test above, it would change to locating the contents of the array. This change would require the introduction of another syntax that identifies the root of the payload. An empty path is one option, another would be $. The latter would align with JSON path which uses $ to refer to the root element.
While the current behaviour is a bug, fixing it will be a breaking change for some so a balance needs to be struck. Waiting until 2.1 feels like the best approach at the moment.
The text was updated successfully, but these errors were encountered:
In working on #626, it has become apparent that the lack of distinction that is made between
a.[]
anda
is problematic. It's a subtle difference, but the former should locate the contents of the array ata
, whereas the latter should locate the array itself.The following tests illustrate the problem:
The first test passes but the second test fails. It fails because the resolved type is
ARRAY
rather thanVARIES
.When a payload is an array at the top level,
[]
is currently used to locate that array. To correct the behaviour of the test above, it would change to locating the contents of the array. This change would require the introduction of another syntax that identifies the root of the payload. An empty path is one option, another would be$
. The latter would align with JSON path which uses$
to refer to the root element.While the current behaviour is a bug, fixing it will be a breaking change for some so a balance needs to be struck. Waiting until 2.1 feels like the best approach at the moment.
The text was updated successfully, but these errors were encountered: