我有一个我无法解决的问题,我在不同的地方寻求和寻求,但我仍然没有找到它.
看到这段代码:
//I have 2 json to merge
var json = @"{'client': {'name': 'Should NO CHANGE', 'lastname': '', 'email': 'asd@asd.com', 'phone': '', 'birthday': '', 'married': false, 'spouse': {'name': '', 'lastname': ''} } }";
var json2 = @" {'client': {'name': 'aaaa', 'lastname': 'bbbb', 'email': 'cccccc@ccccc.com', 'phone': '', 'birthday': '', 'married': false, 'spouse': {'name': 'dddddd', 'lastname': 'eeeee'} } } ";
//for example to properties to replace
var path = "client.spouse";
var path2 = "client.email";
dynamic o1 = JObject.Parse(json);
dynamic o2 = JObject.Parse(json2); …Run Code Online (Sandbox Code Playgroud)