Examples of writeArrayFieldStart()


Examples of org.elasticsearch.common.jackson.core.JsonGenerator.writeArrayFieldStart()

      ByteArrayOutputStream stream = new ByteArrayOutputStream();
      JsonGenerator generator = nodeFactory.createGenerator(stream, JsonEncoding.UTF8);
      generator.writeStartObject();
      for (SearchHitField value : values) {
        if (value.getValues().size() > 1) {
          generator.writeArrayFieldStart(value.getName());
          for (Object val : value.getValues()) {
            generator.writeObject(val);
          }
          generator.writeEndArray();
        } else {
View Full Code Here

Examples of org.elasticsearch.common.xcontent.XContentGenerator.writeArrayFieldStart()

        xsonGen.writeStringField("test", "value");
        jsonGen.writeStringField("test", "value");

        xsonGen.writeArrayFieldStart("arr");
        jsonGen.writeArrayFieldStart("arr");
        xsonGen.writeNumber(1);
        jsonGen.writeNumber(1);
        xsonGen.writeNull();
        jsonGen.writeNull();
        xsonGen.writeEndArray();
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.