Ejemplo 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 splited = pointer.Split((Byte)'/').ToArray();

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