示例#1
0
        public void Pair(string name,
                         IJsonSerializable value)
        {
            if (null == value)
            {
                NullPair(name);
                return;
            }

            _writer.Write("{0}\"{1}\":".FormatWith(Punctuation, name));
            Nesting.Peek().Previous = JsonNodeType.None;

            Object();
            value.WriteJson(this);
            EndObject();
        }
示例#2
0
        public void Pair(string name,
                         IJsonSerializable value)
        {
            if (null == value)
            {
                NullPair(name);
                return;
            }

            _writer.Write("{0}\"{1}\":".FormatWith(Punctuation, name));
            Nesting.Peek().Previous = JsonNodeType.None;

            Object();
            value.WriteJson(this);
            EndObject();
        }