I have a Json document that I want to allow user to add to and edit using JsonPath.
This answer works brilliantly when the document contains the path represented as JsonPath, but does not work when part (or all) of the JsonPath doesn't exist in the document I'm editing.
For example, I want to set:
$.test.configuration
to some Json value {...}
in a document {}
so that the final result looks like this.
{
"test":{
"configuration": {...}
}
}
I've also found a C# JsonPath parser, but it doesn't give me any ideas on how to use it and create the path specified.
Your help is appreciated, thanks in advance!
EDIT: Based on the answer by @cecilphilip, I found JsonDiffPatch which is perfect for my needs!