Package com.fasterxml.jackson.core

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


            boolean isOverridden = (Boolean)(en.getMethod("isOverridden")).invoke(v);
          String valueDescription=(String) (en.getMethod("getValueDescription")).invoke(v);
          Class type = (Class) en.getMethod("getType").invoke(v);
         
            gen.writeStartObject();                                        //          {
            gen.writeStringField("key", key)
            gen.writeStringField("value",valueAsString);
            gen.writeStringField("description", valueDescription);                        //            ,"description":"description"
            gen.writeStringField("type",type.getSimpleName());                          //            ,"type":"type"
            gen.writeBooleanField("editable", isEditable);
            gen.writeBooleanField("overridden", isOverridden);
View Full Code Here


          String valueDescription=(String) (en.getMethod("getValueDescription")).invoke(v);
          Class type = (Class) en.getMethod("getType").invoke(v);
         
            gen.writeStartObject();                                        //          {
            gen.writeStringField("key", key)
            gen.writeStringField("value",valueAsString);
            gen.writeStringField("description", valueDescription);                        //            ,"description":"description"
            gen.writeStringField("type",type.getSimpleName());                          //            ,"type":"type"
            gen.writeBooleanField("editable", isEditable);
            gen.writeBooleanField("overridden", isOverridden);
            gen.writeEndObject();                                          //          }
View Full Code Here

          Class type = (Class) en.getMethod("getType").invoke(v);
         
            gen.writeStartObject();                                        //          {
            gen.writeStringField("key", key)
            gen.writeStringField("value",valueAsString);
            gen.writeStringField("description", valueDescription);                        //            ,"description":"description"
            gen.writeStringField("type",type.getSimpleName());                          //            ,"type":"type"
            gen.writeBooleanField("editable", isEditable);
            gen.writeBooleanField("overridden", isOverridden);
            gen.writeEndObject();                                          //          }
      }
View Full Code Here

         
            gen.writeStartObject();                                        //          {
            gen.writeStringField("key", key)
            gen.writeStringField("value",valueAsString);
            gen.writeStringField("description", valueDescription);                        //            ,"description":"description"
            gen.writeStringField("type",type.getSimpleName());                          //            ,"type":"type"
            gen.writeBooleanField("editable", isEditable);
            gen.writeBooleanField("overridden", isOverridden);
            gen.writeEndObject();                                          //          }
      }
      if (gen.getOutputContext().inArray()) gen.writeEndArray();                          //        ]
View Full Code Here

     
      for (DataPoints[] separate_dps : results) {
        for (DataPoints dps : separate_dps) {
          json.writeStartObject();
         
          json.writeStringField("metric", dps.metricName());
         
          json.writeFieldName("tags");
          json.writeStartObject();
          if (dps.getTags() != null) {
            for (Map.Entry<String, String> tag : dps.getTags().entrySet()) {
View Full Code Here

         
          json.writeFieldName("tags");
          json.writeStartObject();
          if (dps.getTags() != null) {
            for (Map.Entry<String, String> tag : dps.getTags().entrySet()) {
              json.writeStringField(tag.getKey(), tag.getValue());
            }
          }
          json.writeEndObject();
         
          json.writeFieldName("aggregateTags");
View Full Code Here

    // 256 bytes is a good starting value, assumes default info
    final ByteArrayOutputStream output = new ByteArrayOutputStream(256);
    try {
      final JsonGenerator json = JSON.getFactory().createGenerator(output);
      json.writeStartObject();
      json.writeStringField("tsuid", tsuid);
      json.writeStringField("displayName", display_name);
      json.writeStringField("description", description);
      json.writeStringField("notes", notes);
      json.writeNumberField("created", created);
      if (custom == null) {
View Full Code Here

    final ByteArrayOutputStream output = new ByteArrayOutputStream(256);
    try {
      final JsonGenerator json = JSON.getFactory().createGenerator(output);
      json.writeStartObject();
      json.writeStringField("tsuid", tsuid);
      json.writeStringField("displayName", display_name);
      json.writeStringField("description", description);
      json.writeStringField("notes", notes);
      json.writeNumberField("created", created);
      if (custom == null) {
        json.writeNullField("custom");
View Full Code Here

    try {
      final JsonGenerator json = JSON.getFactory().createGenerator(output);
      json.writeStartObject();
      json.writeStringField("tsuid", tsuid);
      json.writeStringField("displayName", display_name);
      json.writeStringField("description", description);
      json.writeStringField("notes", notes);
      json.writeNumberField("created", created);
      if (custom == null) {
        json.writeNullField("custom");
      } else {
View Full Code Here

      final JsonGenerator json = JSON.getFactory().createGenerator(output);
      json.writeStartObject();
      json.writeStringField("tsuid", tsuid);
      json.writeStringField("displayName", display_name);
      json.writeStringField("description", description);
      json.writeStringField("notes", notes);
      json.writeNumberField("created", created);
      if (custom == null) {
        json.writeNullField("custom");
      } else {
        json.writeObjectFieldStart("custom");
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.