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
set/add method evaluates the path and if not present throws the error, ideally this should not be the case.
ideally set sets the field on the desired path. In case of nested fields we should be verifying till the parent node only.
This change is breaking the code where we are setting the field in json using set method.
EvaluationContext evaluationContext = path.evaluate(jsonObject, jsonObject, configuration, true);
if (evaluationContext.getPathList().isEmpty()) {
boolean optSuppressExceptions = configuration.containsOption(Option.SUPPRESS_EXCEPTIONS);
if (optSuppressExceptions) {
return handleMissingPathInContext(configuration);
} else {
throw new PathNotFoundException();
}
}
either we should remove if or we should only check till parent element. as this check is defying the functionality of set method. Suggestions please.
The text was updated successfully, but these errors were encountered:
suhailSj
changed the title
Issue with Version 2.8 - JsonPath.java#set()
Issue with Version 2.8 - JsonPath.java#set() and JsonPath.java#add()
Jan 9, 2024
set/add method evaluates the path and if not present throws the error, ideally this should not be the case.
ideally set sets the field on the desired path. In case of nested fields we should be verifying till the parent node only.
This change is breaking the code where we are setting the field in json using set method.
either we should remove if or we should only check till parent element. as this check is defying the functionality of set method. Suggestions please.
The text was updated successfully, but these errors were encountered: