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
{{ message }}
Repository navigation
Improve consistency of JSONPath in JsonException #31955
If the answer is no, then the dictionary scenario on line 80 is wrong - The path points to the key already read successfully ($.key) while the error is after the colon.
IMO the behavior should be point to where the error was or in case of incorrect syntax, to the closest, which is the previous element/property.
e.g: [1, -> $[0] (Since element zero was the last correct). {"key":1, -> $.key (Since property key was the last correct). {"key":1, "IncompleteProp -> $.key (Since property key was the last correct).
Per discussion about JSON path support, the accuracy may be "off by one" when referencing arrays in certain conditions. See dotnet/corefx#37938 (comment).
This is essentially related to reader functionality, since the deserializer doesn't handle the parsing.
Activity
layomia commentedon Apr 7, 2020
From @steveharter in #30259:
eiriktsarpalis commentedon Oct 15, 2021
I believe this was fixed in #57681