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
var json = "[{\"id\":\"123\",\"name\":\"mytest\",\"email\":\"[email protected]\"}]" var query = ".[] | select(.name==\"mytest\") | .id == \"123\""; var result = query.EvalToToken(receivedJSON);
Exception:
EvalToToken(receivedJSON)' threw an exception of type 'Sprache.ParseException'
Data: {System.Collections.ListDictionaryInternal}
HResult: -2146233088
HelpLink: null
InnerException: null
Message: "Parsing failure: unexpected '['; expected } (Line 1, Column 20); recently consumed: : .headers"
Position: {Line 1, Column 20}
Source: "Sprache"
StackTrace: " at Sprache.ParserExtensions.Parse[T](Parser`1 parser, String input)\r\n at Coeus.JQ.<>c__DisplayClass12_0.b__0(String _)\r\n at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)\r\n at Coeus.JQ.Eval(String jq, JToken token)\r\n at Coeus.JQ.EvalToToken(String jq, JToken token)"
TargetSite: {T Parse[T](Sprache.Parser`1[T], System.String)}
How can I overcome this bug?
The text was updated successfully, but these errors were encountered:
ahmad-masalha
changed the title
Failing to Evaluate filters which include \" as char
Failing to Evaluate filters with select
Jan 25, 2022
var json = "[{\"id\":\"123\",\"name\":\"mytest\",\"email\":\"[email protected]\"}]"
var query = ".[] | select(.name==\"mytest\") | .id == \"123\"";
var result = query.EvalToToken(receivedJSON);
Exception:
EvalToToken(receivedJSON)' threw an exception of type 'Sprache.ParseException'
Data: {System.Collections.ListDictionaryInternal}
HResult: -2146233088
HelpLink: null
InnerException: null
Message: "Parsing failure: unexpected '['; expected } (Line 1, Column 20); recently consumed: : .headers"
Position: {Line 1, Column 20}
Source: "Sprache"
StackTrace: " at Sprache.ParserExtensions.Parse[T](Parser`1 parser, String input)\r\n at Coeus.JQ.<>c__DisplayClass12_0.b__0(String _)\r\n at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)\r\n at Coeus.JQ.Eval(String jq, JToken token)\r\n at Coeus.JQ.EvalToToken(String jq, JToken token)"
TargetSite: {T Parse[T](Sprache.Parser`1[T], System.String)}
How can I overcome this bug?
The text was updated successfully, but these errors were encountered: