Examples of writeStartObject()


Examples of com.alibaba.fastjson.JSONWriter.writeStartObject()

    public void test_0() throws Exception {
        StringWriter out = new StringWriter();

        JSONWriter writer = new JSONWriter(out);
        writer.writeStartObject();
        writer.writeEndObject();
        writer.flush();

        Assert.assertEquals("{}", out.toString());
    }
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.util.TokenBuffer.writeStartObject()

        if (_propertyBasedCreator != null) {
            return deserializeUsingPropertyBasedWithUnwrapped(jp, ctxt);
        }
       
        TokenBuffer tokens = new TokenBuffer(jp.getCodec());
        tokens.writeStartObject();
        final Object bean = _valueInstantiator.createUsingDefault();

        if (_injectables != null) {
            injectValues(ctxt, bean);
        }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.util.TokenBuffer.writeStartObject()

        }
        if (_propertyBasedCreator != null) {
            return deserializeUsingPropertyBasedWithUnwrapped(jp, ctxt);
        }
        TokenBuffer tokens = new TokenBuffer(jp.getCodec());
        tokens.writeStartObject();
        Object bean = _valueInstantiator.createUsingDefault(ctxt);

        if (_injectables != null) {
            injectValues(ctxt, bean);
        }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeStartObject()

                    }
                }
                json.writeEndObject();

                json.writeFieldName("rate");
                json.writeStartObject();
                {
                    writeMeteredFields(timer, json);
                }
                json.writeEndObject();
            }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeStartObject()

        }

        @Override
        public void processGauge(MetricName name, Gauge<?> gauge, Context context) throws Exception {
            final JsonGenerator json = context.json;
            json.writeStartObject();
            {
                json.writeStringField("type", "gauge");
                json.writeObjectField("value", evaluateGauge(gauge));
            }
            json.writeEndObject();
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeStartObject()

        JsonFactory factory = new JsonFactory(new ObjectMapper());
        final JsonGenerator json = factory.createGenerator(writer);
        if (pretty) {
            json.useDefaultPrettyPrinter();
        }
        json.writeStartObject();
        {
            if (("jvm".equals(classPrefix) || Strings.isNullOrEmpty(classPrefix))) {
                writeVmMetrics(json);
            }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeStartObject()

    public static class ServerMetrics implements MetricProcessor<Context> {
        @Override
        public void processMeter(MetricName name, Metered meter, Context context) throws Exception {
            final JsonGenerator json = context.json;
            json.writeStartObject();
            {
                json.writeStringField("type", "meter");
                json.writeStringField("event_type", meter.eventType());
                writeMeteredFields(meter, json);
            }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeStartObject()

        }

        @Override
        public void processCounter(MetricName name, Counter counter, Context context) throws Exception {
            final JsonGenerator json = context.json;
            json.writeStartObject();
            {
                json.writeStringField("type", "counter");
                json.writeNumberField("count", counter.count());
            }
            json.writeEndObject();
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeStartObject()

        }

        @Override
        public void processHistogram(MetricName name, Histogram histogram, Context context) throws Exception {
            final JsonGenerator json = context.json;
            json.writeStartObject();
            {
                json.writeStringField("type", "histogram");
                json.writeNumberField("count", histogram.count());
                writeSummarizable(histogram, json);
                writeSampling(histogram, json);
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeStartObject()

        }

        @Override
        public void processTimer(MetricName name, Timer timer, Context context) throws Exception {
            final JsonGenerator json = context.json;
            json.writeStartObject();
            {
                json.writeStringField("type", "timer");
                json.writeFieldName("duration");
                json.writeStartObject();
                {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.