Examples of writeEndObject()


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

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

        private static Object evaluateGauge(Gauge<?> gauge) {
            try {
                return gauge.value();
View Full Code Here

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

      public void visit(MetricTreeObject o) {
        try {
          writeKey(o);
          jsonGenerator.writeStartObject();
          o.visitChildren(this);
          jsonGenerator.writeEndObject();
        } catch (IOException e) {
          throw new IllegalStateException("Error serializing to JSON", e);
        }
      }
View Full Code Here

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

    // wrap in an object to form proper json
    generator.writeStartObject();

    hstore.jsonWrite(generator, "key", map);

    generator.writeEndObject();
    generator.flush();

    return writer.toString();
  }
View Full Code Here

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

                    wrapAndThrow(e, bean, propName, ctxt);
                }
                continue;
            }
        }
        tokens.writeEndObject();
        _unwrappedPropertyHandler.processUnwrapped(jp, ctxt, bean, tokens);
        return bean;
    }   

    @SuppressWarnings("resource")
View Full Code Here

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

            // how about any setter? We'll get copies but...
            if (_anySetter != null) {
                _anySetter.deserializeAndSet(jp, ctxt, bean, propName);
            }
        }
        tokens.writeEndObject();
        _unwrappedPropertyHandler.processUnwrapped(jp, ctxt, bean, tokens);
        return bean;
    }

    @SuppressWarnings("resource")
View Full Code Here

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

                    while (t == JsonToken.FIELD_NAME) {
                        jp.nextToken(); // to skip name
                        tokens.copyCurrentStructure(jp);
                        t = jp.nextToken();
                    }
                    tokens.writeEndObject();
                    if (bean.getClass() != _beanType.getRawClass()) {
                        // !!! 08-Jul-2011, tatu: Could probably support; but for now
                        //   it's too complicated, so bail out
                        tokens.close();
                        throw ctxt.mappingException("Can not create polymorphic instances with unwrapped values");
View Full Code Here

Examples of com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator.writeEndObject()

        for (Value value : values) {
            generator.writeFieldName("foo");
            generator.setNextName(new QName("item"));
            generator.writeObject(value);
        }
        generator.writeEndObject();
        generator.close();
       
        String xml = sw.toString();
       
        // Remove XML declaration
View Full Code Here

Examples of com.google.api.client.json.JsonGenerator.writeEndObject()

  public void writeTo(OutputStream out) throws IOException {
    JsonGenerator generator = getJsonFactory().createJsonGenerator(out, getCharset());
    generator.writeStartObject();
    generator.writeFieldName("data");
    generator.serialize(getData());
    generator.writeEndObject();
    generator.flush();
  }

  @Override
  public JsonCContent setMediaType(HttpMediaType mediaType) {
View Full Code Here

Examples of com.linkedin.data.schema.JsonBuilder.writeEndObject()

    jsonBuilder.writeEndArray();

    jsonBuilder.writeFieldName(Snapshot.SCHEMA_KEY);
    jsonBuilder.writeStartObject();
    jsonBuilder.writeProperties(_topLevelSchema.data());
    jsonBuilder.writeEndObject();

    jsonBuilder.writeEndObject();

    try
    {
View Full Code Here

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

          List<Object> functions = new ArrayList<Object>(context.getFunctions());
          for (Object function : functions) {
            g.writeObject(function);
          }
          g.writeEndArray();
          g.writeEndObject();
          g.close();
        }
        response.setCharacterEncoding("UTF-8");
        response.setContentType("application/javascript");
        response.setStatus(200);
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.