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
And I wanted to simplify it down to the next json:
[
"SDF",
"INC"
]
When I use https://jsonpath.com/ for finding the relevant JPath for me, I had several lines that worked
$.[items].[genericItems].[value].StringValue
$.items[].genericItems[].value.StringValue
but when I attempted to use it with the JsonCons library, I either got nothing, or the next error
'Expected unquoted string, or single or double quoted string, or index or '*''
What is the difference between https://jsonpath.com/ and the library? do they not use the same standard?
My code:
var json = JsonSerializer.Serialize(items.Items);
var jsonArray = JsonDocument.Parse(json);
var selected = JsonSelector.Select(jsonArray.RootElement, @jPath).ToList();
return selected;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a JPath which I attempted to use with the following json:
And I wanted to simplify it down to the next json:
When I use https://jsonpath.com/ for finding the relevant JPath for me, I had several lines that worked
$.[items].[genericItems].[value].StringValue
$.items[].genericItems[].value.StringValue
but when I attempted to use it with the JsonCons library, I either got nothing, or the next error
'Expected unquoted string, or single or double quoted string, or index or '*''
What is the difference between https://jsonpath.com/ and the library? do they not use the same standard?
My code:
Beta Was this translation helpful? Give feedback.
All reactions