Examples of writeNumberField()


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

      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");
        for (Map.Entry<String, String> entry : custom.entrySet()) {
View Full Code Here

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

                continue;
              }
              final long timestamp = data_query.getMsResolution() ?
                  dp.timestamp() : dp.timestamp() / 1000;
              if (dp.isInteger()) {
                json.writeNumberField(Long.toString(timestamp), dp.longValue());
              } else {
                json.writeNumberField(Long.toString(timestamp), dp.doubleValue());
              }
            }
            json.writeEndObject();
View Full Code Here

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

              final long timestamp = data_query.getMsResolution() ?
                  dp.timestamp() : dp.timestamp() / 1000;
              if (dp.isInteger()) {
                json.writeNumberField(Long.toString(timestamp), dp.longValue());
              } else {
                json.writeNumberField(Long.toString(timestamp), dp.doubleValue());
              }
            }
            json.writeEndObject();
          }
View Full Code Here

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

        }
        json.writeEndObject();
      }
      json.writeStringField("units", units);
      json.writeStringField("dataType", data_type);
      json.writeNumberField("retention", retention);
      json.writeNumberField("max", max);
      json.writeNumberField("min", min);
     
      json.writeEndObject();
      json.close();
View Full Code Here

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

        json.writeEndObject();
      }
      json.writeStringField("units", units);
      json.writeStringField("dataType", data_type);
      json.writeNumberField("retention", retention);
      json.writeNumberField("max", max);
      json.writeNumberField("min", min);
     
      json.writeEndObject();
      json.close();
      return output.toByteArray();
View Full Code Here

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

      }
      json.writeStringField("units", units);
      json.writeStringField("dataType", data_type);
      json.writeNumberField("retention", retention);
      json.writeNumberField("max", max);
      json.writeNumberField("min", min);
     
      json.writeEndObject();
      json.close();
      return output.toByteArray();
    } catch (IOException e) {
View Full Code Here

Examples of com.fasterxml.jackson.databind.util.TokenBuffer.writeNumberField()

        mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);

        // Ok, first test JSON Object containing buffer:
        TokenBuffer buf = new TokenBuffer(mapper, false);
        buf.writeStartObject();
        buf.writeNumberField("num", 42);
        buf.writeEndObject();
        String json = mapper.writeValueAsString(new ObjectHolder(buf));
        ObjectHolder holder = mapper.readValue(json, ObjectHolder.class);
        assertNotNull(holder.value);
        assertSame(TokenBuffer.class, holder.value.getClass());
View Full Code Here

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

            g.writeStartObject();
            g.writeArrayFieldStart("generations");
            for (int level = 0; level < generations.length; level++)
            {
                g.writeStartObject();
                g.writeNumberField("generation", level);
                g.writeArrayFieldStart("members");
                for (SSTableReader ssTableReader : generations[level])
                    g.writeNumber(ssTableReader.descriptor.generation);
                g.writeEndArray(); // members
View Full Code Here

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

            g.writeStartObject();
            g.writeArrayFieldStart("generations");
            for (int level = 0; level < generations.length; level++)
            {
                g.writeStartObject();
                g.writeNumberField("generation", level);
                g.writeArrayFieldStart("members");
                for (SSTableReader ssTableReader : generations[level])
                    g.writeNumber(ssTableReader.descriptor.generation);
                g.writeEndArray(); // members
View Full Code Here

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

            g.writeStartObject();
            g.writeArrayFieldStart("generations");
            for (int level = 0; level < generations.length; level++)
            {
                g.writeStartObject();
                g.writeNumberField("generation", level);
                g.writeArrayFieldStart("members");
                for (SSTableReader ssTableReader : generations[level])
                    g.writeNumber(ssTableReader.descriptor.generation);
                g.writeEndArray(); // members
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.