org.linkedin.util.json.jackson
Class JacksonPrettyPrinter

java.lang.Object
  extended by org.linkedin.util.json.jackson.JacksonPrettyPrinter
All Implemented Interfaces:
com.fasterxml.jackson.core.PrettyPrinter

public class JacksonPrettyPrinter
extends java.lang.Object
implements com.fasterxml.jackson.core.PrettyPrinter

Handles indentation levels + tighten output slightly


Field Summary
static com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Indenter LF_2_SPACES_INDENTER
           
 
Constructor Summary
JacksonPrettyPrinter(int indent)
           
 
Method Summary
 void beforeArrayValues(com.fasterxml.jackson.core.JsonGenerator jg)
           
 void beforeObjectEntries(com.fasterxml.jackson.core.JsonGenerator jg)
           
 void writeArrayValueSeparator(com.fasterxml.jackson.core.JsonGenerator jg)
           
 void writeEndArray(com.fasterxml.jackson.core.JsonGenerator jg, int nrOfValues)
           
 void writeEndObject(com.fasterxml.jackson.core.JsonGenerator jg, int nrOfEntries)
           
 void writeObjectEntrySeparator(com.fasterxml.jackson.core.JsonGenerator jg)
           
 void writeObjectFieldValueSeparator(com.fasterxml.jackson.core.JsonGenerator jg)
           
 void writeRootValueSeparator(com.fasterxml.jackson.core.JsonGenerator jg)
           
 void writeStartArray(com.fasterxml.jackson.core.JsonGenerator jg)
           
 void writeStartObject(com.fasterxml.jackson.core.JsonGenerator jg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LF_2_SPACES_INDENTER

public static final com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Indenter LF_2_SPACES_INDENTER
Constructor Detail

JacksonPrettyPrinter

public JacksonPrettyPrinter(int indent)
Method Detail

writeRootValueSeparator

public void writeRootValueSeparator(com.fasterxml.jackson.core.JsonGenerator jg)
                             throws java.io.IOException
Specified by:
writeRootValueSeparator in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

writeStartObject

public void writeStartObject(com.fasterxml.jackson.core.JsonGenerator jg)
                      throws java.io.IOException
Specified by:
writeStartObject in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

writeEndObject

public void writeEndObject(com.fasterxml.jackson.core.JsonGenerator jg,
                           int nrOfEntries)
                    throws java.io.IOException
Specified by:
writeEndObject in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

writeObjectEntrySeparator

public void writeObjectEntrySeparator(com.fasterxml.jackson.core.JsonGenerator jg)
                               throws java.io.IOException
Specified by:
writeObjectEntrySeparator in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

writeObjectFieldValueSeparator

public void writeObjectFieldValueSeparator(com.fasterxml.jackson.core.JsonGenerator jg)
                                    throws java.io.IOException
Specified by:
writeObjectFieldValueSeparator in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

writeStartArray

public void writeStartArray(com.fasterxml.jackson.core.JsonGenerator jg)
                     throws java.io.IOException
Specified by:
writeStartArray in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

writeEndArray

public void writeEndArray(com.fasterxml.jackson.core.JsonGenerator jg,
                          int nrOfValues)
                   throws java.io.IOException
Specified by:
writeEndArray in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

writeArrayValueSeparator

public void writeArrayValueSeparator(com.fasterxml.jackson.core.JsonGenerator jg)
                              throws java.io.IOException
Specified by:
writeArrayValueSeparator in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

beforeArrayValues

public void beforeArrayValues(com.fasterxml.jackson.core.JsonGenerator jg)
                       throws java.io.IOException
Specified by:
beforeArrayValues in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException

beforeObjectEntries

public void beforeObjectEntries(com.fasterxml.jackson.core.JsonGenerator jg)
                         throws java.io.IOException
Specified by:
beforeObjectEntries in interface com.fasterxml.jackson.core.PrettyPrinter
Throws:
java.io.IOException