Esempio n. 1
0
        public JsonPointer(Utf8String pointer) : this()
        {
            int pos;

            if (!pointer.TrySearchAscii((Byte)'/', 0, out pos))
            {
                throw new ArgumentException();
            }
            if (pos != 0)
            {
                throw new ArgumentException();
            }

            var split = pointer.Split((Byte)'/').ToArray();

            Path = new ArraySegment <Utf8String>(split, 1, split.Length - 1);
        }