예제 #1
0
        protected override JToken Replace(ReplaceOperation operation, JToken target)
        {
            var token = operation.Path.Find(target);

            if (token.Parent == null)
            {
                return(operation.Value);
            }
            else
            {
                token.Replace(operation.Value);
                return(null);
            }
        }
예제 #2
0
        protected override JToken Replace(ReplaceOperation operation, JToken target)
        {
            operation.Path.ToString().Replace("~1", "/").Replace("~0", "~");
            var token = operation.Path.Find(target);

            if (token.Parent == null)
            {
                return(operation.Value);
            }
            else
            {
                token.Replace(operation.Value);
                return(null);
            }
        }