System.Text.Json Merge two objects
问题 Is it possible to merge two json objects like this with System.Text.Json? Object 1 { id: 1 william: "shakespeare" } Object 2 { william: "dafoe" foo: "bar" } Result Object { id: 1 william: "dafoe" foo: "bar" } I am able to achieve it with newtonsoft.json like this var obj1 = JObject.Parse(obj1String); var obj2 = JObject.Parse(obj2String); obj1.Merge(obj2); result = settings.ToString(); But is there a way with System.Text.Json ? 回答1: As of .Net Core 3.0 merging of JSON objects is not