Package com.fasterxml.jackson.core

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


    generator.writeStringField("environment", this.environment);
    generator.writeStringField("serverName", this.serverName);
    generator.writeStringField("backtrace",
        ExceptionUtils.getStackTrace(throwable));
    generator.writeStringField("message", rootThrowable.getMessage());
    generator.writeStringField("logMessage", message);
    generator.writeStringField("type", rootThrowable.getClass().getName());
    if (level != Level.ERROR) {
      generator.writeStringField("errorLevel", level.toString());
    }
    writeContext(generator);
View Full Code Here


    generator.writeStringField("serverName", this.serverName);
    // FIXME this was 'throwable'
    generator.writeStringField("backtrace", getStackTrace(rootThrowable));
    generator.writeStringField("message", rootThrowable.getMessage());
    generator.writeStringField("logMessage", message);
    generator.writeStringField("type", rootThrowable.getClassName());
    if (level != Level.ERROR) {
      generator.writeStringField("errorLevel", level.toString());
    }
    writeContext(generator);
    generator.writeEndObject();
View Full Code Here

    generator.writeStringField("serverName", this.serverName);
    generator.writeStringField("backtrace",
        ExceptionUtils.getStackTrace(throwable));
    generator.writeStringField("message", rootThrowable.getMessage());
    generator.writeStringField("logMessage", message);
    generator.writeStringField("type", rootThrowable.getClass().getName());
    if (level != Level.ERROR) {
      generator.writeStringField("errorLevel", level.toString());
    }
    writeContext(generator);
    generator.writeEndObject();
View Full Code Here

    generator.writeStringField("backtrace", getStackTrace(rootThrowable));
    generator.writeStringField("message", rootThrowable.getMessage());
    generator.writeStringField("logMessage", message);
    generator.writeStringField("type", rootThrowable.getClassName());
    if (level != Level.ERROR) {
      generator.writeStringField("errorLevel", level.toString());
    }
    writeContext(generator);
    generator.writeEndObject();
    generator.close();
  }
View Full Code Here

        ExceptionUtils.getStackTrace(throwable));
    generator.writeStringField("message", rootThrowable.getMessage());
    generator.writeStringField("logMessage", message);
    generator.writeStringField("type", rootThrowable.getClass().getName());
    if (level != Level.ERROR) {
      generator.writeStringField("errorLevel", level.toString());
    }
    writeContext(generator);
    generator.writeEndObject();
    generator.close();
  }
View Full Code Here

        {
            JsonGenerator g = this.jsonFactory.createJsonGenerator( stringWriter );

            g.writeStartObject();

            g.writeStringField( DirectMemoryConstants.KEY_FIELD_NAME, request.getKey() );

            g.writeBooleanField( DirectMemoryConstants.PUT_FIELD_NAME, request.isUpdate() );

            g.writeNumberField( DirectMemoryConstants.EXPIRES_IN_FIELD_NAME, request.getExpiresIn() );
View Full Code Here

            g.writeFieldName( DirectMemoryConstants.CACHE_CONTENT_FIELD_NAME );
            g.writeBinary( bytes );

            if ( serializer != null )
            {
                g.writeStringField( DirectMemoryConstants.SERIALIZER_FIELD_NAME, serializer.getClass().getName() );
            }

            g.writeEndObject();
            g.close();
        }
View Full Code Here

            g.writeStartObject();

            g.writeBooleanField( DirectMemoryConstants.FOUND_FIELD_NAME, response.isFound() );

            g.writeStringField( DirectMemoryConstants.KEY_FIELD_NAME, response.getKey() );

            if ( response.getCacheContent() != null && response.getCacheContent().length > 0 )
            {
                g.writeFieldName( DirectMemoryConstants.CACHE_CONTENT_FIELD_NAME );
                g.writeBinary( response.getCacheContent() );
View Full Code Here

            if (isTemplateMissing) {
                LOGGER.debug("No metrics template found in elasticsearch. Adding...");
                HttpURLConnection putTemplateConnection = openConnection( "/_template/metrics_template", "PUT");
                JsonGenerator json = new JsonFactory().createGenerator(putTemplateConnection.getOutputStream());
                json.writeStartObject();
                json.writeStringField("template", index + "*");
                json.writeObjectFieldStart("mappings");

                json.writeObjectFieldStart("_default_");
                json.writeObjectFieldStart("_all");
                json.writeBooleanField("enabled", false);
View Full Code Here

     
      json.writeStartObject();
     
      // we only need to write a small amount of information
      //json.writeNumberField("treeId", tree_id);
      json.writeStringField("name", name);
      json.writeStringField("description", description);
      json.writeStringField("notes", notes);
      json.writeBooleanField("strictMatch", strict_match);
      json.writeNumberField("created", created);
      json.writeBooleanField("enabled", enabled);
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.