JSON.NET \ how to concat two JSONs in JSon.net
问题 I have two JSONs (as simple strings) - is there neat way to concat them? As part of the infrastructure?? 回答1: string j1 = @"{""a"":1}"; string j2 = @"{""b"":2}"; var j = JsonConvert.SerializeObject(new[] { JsonConvert.DeserializeObject(j1), JsonConvert.DeserializeObject(j2) }); or var j = JsonConvert.SerializeObject(new { obj1 = JObject.Parse(j1), obj2 = JObject.Parse(j2) }); 来源: https://stackoverflow.com/questions/12913396/json-net-how-to-concat-two-jsons-in-json-net