Examples of writeObjectField()


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

                {
                    json.writeStringField("unit", timer.durationUnit().toString().toLowerCase());
                    writeSummarizable(timer, json);
                    writeSampling(timer, json);
                    if (context.showFullSamples) {
                        json.writeObjectField("values", timer.getSnapshot().getValues());
                    }
                }
                json.writeEndObject();

                json.writeFieldName("rate");
View Full Code Here

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

        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();
        }

        private static void writeSummarizable(Summarizable metric, JsonGenerator json) throws IOException {
View Full Code Here

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

                json.writeNumberField("count", histogram.count());
                writeSummarizable(histogram, json);
                writeSampling(histogram, json);

                if (context.showFullSamples) {
                    json.writeObjectField("values", histogram.getSnapshot().getValues());
                }
            }
            json.writeEndObject();
        }
View Full Code Here

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

                json.writeObjectFieldStart("_all");
                json.writeBooleanField("enabled", false);
                json.writeEndObject();
                json.writeObjectFieldStart("properties");
                json.writeObjectFieldStart("name");
                json.writeObjectField("type", "string");
                json.writeObjectField("index", "not_analyzed");
                json.writeEndObject();
                json.writeEndObject();
                json.writeEndObject();
View Full Code Here

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

                json.writeBooleanField("enabled", false);
                json.writeEndObject();
                json.writeObjectFieldStart("properties");
                json.writeObjectFieldStart("name");
                json.writeObjectField("type", "string");
                json.writeObjectField("index", "not_analyzed");
                json.writeEndObject();
                json.writeEndObject();
                json.writeEndObject();

                json.writeEndObject();
View Full Code Here

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

      final JsonGenerator json = JSON.getFactory().createGenerator(output);
     
      json.writeStartObject();
     
      // we only need to write a small amount of information
      json.writeObjectField("path", path);
      json.writeStringField("displayName", display_name);
     
      json.writeEndObject();
      json.close();
     
View Full Code Here

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

      final JsonGenerator json = JSON.getFactory().createGenerator(output);
     
      json.writeStartObject();
     
      // we only need to write a small amount of information
      json.writeObjectField("displayName", display_name);
      json.writeObjectField("tsuid", tsuid);
     
      json.writeEndObject();
      json.close();
     
View Full Code Here

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

     
      json.writeStartObject();
     
      // we only need to write a small amount of information
      json.writeObjectField("displayName", display_name);
      json.writeObjectField("tsuid", tsuid);
     
      json.writeEndObject();
      json.close();
     
      // TODO zero copy?
View Full Code Here

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

            jsonGenerator.writeStringField(ID, principal.getId());
            jsonGenerator.writeArrayFieldStart(ATTRIBUTES);
            final Map<String, Object> attributes = principal.getAttributes();
            for (final String key : attributes.keySet()) {
                jsonGenerator.writeStartObject();
                jsonGenerator.writeObjectField(key, attributes.get(key));
                jsonGenerator.writeEndObject();
            }
            jsonGenerator.writeEndArray();
            jsonGenerator.writeEndObject();
            return null;
View Full Code Here

Examples of org.codehaus.jackson.JsonGenerator.writeObjectField()

        if (phase.getKeepResults()) {
          json.writeBooleanField("keep", true);
        }
        // Arg
        if (null != phase.getArg()) {
          json.writeObjectField("arg", phase.getArg());
        }

        json.writeEndObject();
        json.writeEndObject();
      }
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.