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
Is your feature request related to a problem? Please describe.
Version 2.14 deprecated JsonNode.with(String) and suggests replacing it with JsonNode.withObject(String). However, this causes problems because JsonNode.withObject(String) accepts only expressions, whereas the former method accepts a property. Moreover, JsonNode.withArray(String) accepts both property names and expressions, making it quite asymmetric.
Describe the solution you'd like
Migrating the method would imply in many cases extra work and prepending the "/" before every property name in existing calls.
From the deprecation message of JsonNode.with(String) I would change myObj.with(myProp) to myObj.withObject(myProp) but that throws an exception, so I have to do myObj.withObject("/" + myProp), which I find unpleasant. Again, myObj.withArray(myProp) works just fine without need of change.
Usage example
The change from myObj.with(myProp) to myObj.withObject(myProp) should work with property or expression.