This PR contains code to allow the user to specify non-existing keys, in the path of the SetValueAndOverrideInJsonObjectByJPath that will create the path, and set the value.
The above method will override if there's an object already existing path as specified by the user.
The existing method SetValueInJsonObjectByJPath has its functionality intact.
Key Scenarios that'll be supported by this change (there were a lot of other scenarios that I could think of but I think the below capture the below are the key ones):
Scenario 1: Non-existing object path
Scenario 2: Non-existing object with Array
Scenario 3: Override object with array
Scenario 4: Create a non-existing continuous array
Results for the existing test, and the new ones passing:
Summary:
SetValueAndOverrideInJsonObjectByJPath
that will create the path, and set the value.SetValueInJsonObjectByJPath
has its functionality intact.Key Scenarios that'll be supported by this change (there were a lot of other scenarios that I could think of but I think the below capture the below are the key ones):
Results for the existing test, and the new ones passing: