Package com.fasterxml.jackson.core

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


                json.writeEndObject();
                json.writeEndObject();
                json.writeEndObject();

                json.writeEndObject();
                json.writeEndObject();
                json.flush();

                putTemplateConnection.disconnect();
                if (putTemplateConnection.getResponseCode() != 200) {
                    LOGGER.error("Error adding metrics template to elasticsearch: {}/{}" + putTemplateConnection.getResponseCode(), putTemplateConnection.getResponseMessage());
View Full Code Here


        try {
            JsonGenerator g = getJsonGenerator(flags, writer);
            g.writeStartObject();
            renderJson(flags, g, representation, false);
            g.writeEndObject();
            g.close();
        } catch (IOException e) {
            throw new RepresentationException(e);
        }
View Full Code Here

      json.writeStringField("notes", notes);
      json.writeBooleanField("strictMatch", strict_match);
      json.writeNumberField("created", created);
      json.writeBooleanField("enabled", enabled);
      json.writeBooleanField("storeFailures", store_failures);
      json.writeEndObject();
      json.close();
     
      // TODO zero copy?
      return output.toByteArray();
    } catch (IOException e) {
View Full Code Here

     
      // we only need to write a small amount of information
      json.writeObjectField("path", path);
      json.writeStringField("displayName", display_name);
     
      json.writeEndObject();
      json.close();
     
      // TODO zero copy?
      return output.toByteArray();
    } catch (IOException e) {
View Full Code Here

      } else {
        json.writeObjectFieldStart("custom");
        for (Map.Entry<String, String> entry : custom.entrySet()) {
          json.writeStringField(entry.getKey(), entry.getValue());
        }
        json.writeEndObject();
      }
     
      json.writeEndObject();
      json.close();
      return output.toByteArray();
View Full Code Here

          json.writeStringField(entry.getKey(), entry.getValue());
        }
        json.writeEndObject();
      }
     
      json.writeEndObject();
      json.close();
      return output.toByteArray();
    } catch (IOException e) {
      throw new RuntimeException("Unable to serialize Annotation", e);
    }
View Full Code Here

      } else {
        json.writeObjectFieldStart("custom");
        for (Map.Entry<String, String> entry : custom.entrySet()) {
          json.writeStringField(entry.getKey(), entry.getValue());
        }
        json.writeEndObject();
      }
     
      json.writeEndObject();
      json.close();
      return output.toByteArray();
View Full Code Here

          json.writeStringField(entry.getKey(), entry.getValue());
        }
        json.writeEndObject();
      }
     
      json.writeEndObject();
      json.close();
      return output.toByteArray();
    } catch (IOException e) {
      throw new RuntimeException("Unable to serialize UIDMeta", e);
    }
View Full Code Here

     
      // 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?
      return output.toByteArray();
    } catch (IOException e) {
View Full Code Here

        writeIfNotNull(jg, bp.getLinkWalkFunction(), Constants.FL_SCHEMA_LINKFUN);
        writeIfNotNull(jg, bp.getPostcommitHooks(), Constants.FL_SCHEMA_POSTCOMMIT);
        writeIfNotNull(jg, bp.getPrecommitHooks(), Constants.FL_SCHEMA_PRECOMMIT);
        writeIfNotNull(jg, bp.getSearch(), Constants.FL_SCHEMA_SEARCH);

        jg.writeEndObject();

        jg.flush();
        return CharsetUtils.asUTF8String(out.toByteArray());
    }
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.