public IEnumerable <XName> ReadChildElements() { if (_reader.TokenType == JsonToken.EndArray) { _elementStack.Pop(); _reader.Read(); yield break; } int depth = _reader.Depth - 1; while (true) { if (_reader.TokenType == JsonToken.EndArray && depth == _reader.Depth) { _elementStack.Pop(); _reader.Read(); break; } if (_reader.TokenType == JsonToken.StartArray) { _peekElement = ReadElement(); yield return(_peekElement.Name); } else if (JsonReaderImpl.IsPrimitive(_reader.TokenType)) { // primitive collection item yield return(null); } else { _reader.Read(); } } }
public static IReader Create(TextReader input) { return(new JsonMLReader(JsonReaderImpl.CreateJsonReader(input), true)); }