Example #1
0
        public void ThatSingleAssignmentWorks()
        {
            var parser = Utilities.jsonParserFromString("\"key\":[1,2,3]");
            var tree   = parser.pair().Tree;

            var stream = new CommonTreeNodeStream(tree);
            var walker = new JsonTree(stream);
            var root   = walker.kvp();

            Assert.AreEqual("key", root.Key);
            Assert.AreEqual(typeof(object[]), root.Value.GetType());
            Assert.AreEqual(2d, ((object[])root.Value)[1]);
        }
        public void ThatSingleAssignmentWorks()
        {
            var parser = Utilities.jsonParserFromString("\"key\":[1,2,3]");
            var tree = parser.pair().Tree;

            var stream = new CommonTreeNodeStream(tree);
            var walker = new JsonTree(stream);
            var root = walker.kvp();
            Assert.AreEqual("key", root.Key);
            Assert.AreEqual(typeof(object[]), root.Value.GetType());
            Assert.AreEqual(2d, ((object[])root.Value)[1]);

        }