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 interpreter = new Interpreter();
var test = JObject.Parse("{ \"date\": \"2024-11-11T11:11:11Z\" }");
interpreter.SetVariable("test", test);
var result = interpreter.Eval("test.SelectToken(\"$.date\").ToObject<DateTime>()");
Actual behavior
The following exception:
DynamicExpresso.Exceptions.ParseException : '.' or '(' expected (at index 44).
at DynamicExpresso.Parsing.Parser.ValidateToken(TokenId t, String errorMessage)
at DynamicExpresso.Parsing.Parser.ParseTypeKeyword(Type type)
at DynamicExpresso.Parsing.Parser.ParseIdentifier()
at DynamicExpresso.Parsing.Parser.ParsePrimaryStart()
at DynamicExpresso.Parsing.Parser.ParsePrimary()
at DynamicExpresso.Parsing.Parser.ParseUnary()
at DynamicExpresso.Parsing.Parser.ParseMultiplicative()
at DynamicExpresso.Parsing.Parser.ParseAdditive()
at DynamicExpresso.Parsing.Parser.ParseShift()
at DynamicExpresso.Parsing.Parser.ParseComparison()
at DynamicExpresso.Parsing.Parser.ParseLogicalAnd()
at DynamicExpresso.Parsing.Parser.ParseLogicalXor()
at DynamicExpresso.Parsing.Parser.ParseLogicalOr()
at DynamicExpresso.Parsing.Parser.ParseConditionalAnd()
at DynamicExpresso.Parsing.Parser.ParseConditionalOr()
at DynamicExpresso.Parsing.Parser.ParseConditional()
at DynamicExpresso.Parsing.Parser.ParseAssignment()
at DynamicExpresso.Parsing.Parser.ParseExpressionSegment()
at DynamicExpresso.Parsing.Parser.ParseExpressionSegment(Type returnType)
at DynamicExpresso.Parsing.Parser.Parse()
at DynamicExpresso.Parsing.Parser.Parse(ParserArguments arguments)
at DynamicExpresso.Interpreter.ParseAsLambda(String expressionText, Type expressionType, Parameter[] parameters)
at DynamicExpresso.Interpreter.Parse(String expressionText, Type expressionType, Parameter[] parameters)
at DynamicExpresso.Interpreter.Eval(String expressionText, Type expressionType, Parameter[] parameters)
at DynamicExpresso.Interpreter.Eval(String expressionText, Parameter[] parameters)
Expected behavior
To return a DateTime parsed from the json.
The text was updated successfully, but these errors were encountered:
Dynamic expression version
Problematic code
Actual behavior
The following exception:
Expected behavior
To return a DateTime parsed from the json.
The text was updated successfully, but these errors were encountered: