示例#1
0
 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
     }
 }
示例#2
0
 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));
     }
 }
示例#3
0
 public static IEnumerable <JsonNode> GetNodes(this JsonNode self,
                                               Utf8String jsonPointer)
 {
     return(self.GetNodes(new JsonPointer(jsonPointer)));
 }