https://bz.apache.org/bugzilla/show_bug.cgi?id=65681

--- Comment #6 from Philippe Mouawad <[email protected]> ---
(In reply to Felix Schumacher from comment #5)
> Created attachment 38091 [details]
> Set default value when a null value is found by the JSON path expression
> 
> I added test cases for the new behaviour.
Thanks for investigation and fix.
> 
> I am not sure, whether the handling of multiple results is correct or
> intended.
> 
> Consider the structure '[{"c": null}, {"c": "abc"}]' and the path '$[*].c'
> with a default value of "NONE". JSON Path will lead to a result of '[null,
> "abc"]' which we will enhance to '["NONE", "abc"]'. (That sounds valid)
> 
Agreed

> But, what if the user intended to give a default value for a complete absent
> result? Like using an expression '$.listOfValues' on the above structure and
> an expected default value '[1, 2, 3]'? In that case the new implementation
> would yield unexpected results.

I don't get the case.
What will be the result vs the previous behaviour ? Was it more consistent
before ? 



What 
> 
> What are your opinions on this?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to