Ejemplo n.º 1
0
 /// <summary>
 /// Method which recreates a new JsonElement from an existing one, with an extra property added along the way
 /// </summary>
 /// <param name="property">The property to add</param>
 /// <returns>A new JsonElement containing the old properties plus the new property</returns>
 public static JsonElement AddProperty(this JsonElement jElement, JsonProperty property)
 {
     return(jElement.ParseAsJsonStringAndMutate((utf8JsonWriter1, namesOfPropertiesToRemove) => property.WriteTo(utf8JsonWriter1)));
 }