Esempio n. 1
0
        public void Object()
        {
            _writer.BeginObject();
            _writer.PropertyName("foo");
            _writer.Write(1);
            _writer.EndObject();

            _sw.ToString().ShouldBeEquivalentTo("{\"foo\":1}");
        }
Esempio n. 2
0
        public void SimpleObject()
        {
            const string expected =
                @"{
	""foo"":1
}";

            _writer.BeginObject();
            _writer.PropertyName("foo");
            _writer.Write(1);
            _writer.EndObject();
            _sw.ToString().ShouldBeEquivalentTo(expected);
        }