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