Exemplo n.º 1
0
        public JsonArrayBuilder PushObject <T>(T value, Action <JsonObjectBuilder, T> push)
        {
            EnsureState();
            writer.WriteCommaIf(startOffset);
            var objectBuilder = new JsonObjectBuilder(writer);

            push(objectBuilder, value);
            objectBuilder.Dispose();
            return(this);
        }
Exemplo n.º 2
0
        public JsonObjectBuilder PutObject <T>(string key, T value, Action <JsonObjectBuilder, T> put)
        {
            EnsureState();
            writer.WriteCommaIf(startOffset);
            writer.WriteKey(key);
            var objectBuilder = new JsonObjectBuilder(writer);

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