Replies: 1 comment
-
Hi :) An example: `using System; public class Program string json2 = @"{ JsonDocument doc1 = JsonDocument.Parse(json1); var dict1 = new Dictionary<string, JsonElement>(); var dict2 = new Dictionary<string, JsonElement>(); foreach (var item in dict2) string mergedJson = JsonSerializer.Serialize(dict1); Result: {"propA":"myPropPlus","some_other_prop":1234,"propB":true} |
Beta Was this translation helpful? Give feedback.
-
I have a json named a:
and a json named b:
how can i merge these two json by using System.Text.Json.JsonDocument ?
the expected result:
Beta Was this translation helpful? Give feedback.
All reactions