public static void RemoveValue(this JsonNode self, Utf8String jsonPointer) { foreach (var node in self.GetNodes(new JsonPointer(jsonPointer))) { if (node.Parent.IsMap()) { node.Prev.SetValue(default(JsonValue)); // remove key } node.SetValue(default(JsonValue)); // remove } }
public static void SetValue(this JsonNode self, Utf8String jsonPointer, ArraySegment <Byte> bytes) { foreach (var node in self.GetNodes(jsonPointer)) { node.SetValue(default(JsonValue).New( bytes, ValueNodeType.Boolean, node.Value.ParentIndex)); } }
public static IEnumerable <JsonNode> GetNodes(this JsonNode self, Utf8String jsonPointer) { return(self.GetNodes(new JsonPointer(jsonPointer))); }