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
However the nested values are not resolved. So accessing for example @nested.nestedValue will result in error. I have found out, that in the Interpreter class you are resolving Map<Object,Object> however in this case it's Map<String,Object> so the exception
"Error executing get expression: could not determine the value of:" will be fired.
My current fix is to simply add the Map<String, Object> to the Interpreter resolution. Works fine even with multiple levels of nested values.
} else if (result instanceof Map<String, Object>) {
if (!getExpr.arguments.isEmpty()) {
throw new Exceptions.RuntimeException(
getExpr.field,
'Error executing expression. Get expressions on Maps must not have arguments.'
);
}
Map<String, Object> castMap = (Map<String, Object>) result;
if (castMap.containsKey(getExpr.field.lexeme)) {
return castMap.get(getExpr.field.lexeme);
}
throw new Exceptions.RuntimeException(
getExpr.field,
'Error executing get expression: the map does not contain a key with the name: ' + getExpr.field.lexeme
);
}
The text was updated successfully, but these errors were encountered:
Hi,
I came across use case, where I want to use JSON as custom context. For example:
Then we add it to the config as:
However the nested values are not resolved. So accessing for example @nested.nestedValue will result in error. I have found out, that in the Interpreter class you are resolving Map<Object,Object> however in this case it's Map<String,Object> so the exception
"Error executing get expression: could not determine the value of:" will be fired.
My current fix is to simply add the Map<String, Object> to the Interpreter resolution. Works fine even with multiple levels of nested values.
The text was updated successfully, but these errors were encountered: