示例#1
0
        public JsonArrayBuilder PushArray <T>(T value, Action <JsonArrayBuilder, T> push)
        {
            EnsureState();
            writer.WriteCommaIf(startOffset);
            var arrayBuilder = new JsonArrayBuilder(writer);

            push(arrayBuilder, value);
            arrayBuilder.Dispose();
            return(this);
        }
示例#2
0
        public JsonObjectBuilder PutArray <T>(string key, T value, Action <JsonArrayBuilder, T> put)
        {
            EnsureState();
            writer.WriteCommaIf(startOffset);
            writer.WriteKey(key);
            var arrayBuilder = new JsonArrayBuilder(writer);

            put(arrayBuilder, value);
            arrayBuilder.Dispose();
            return(this);
        }