/** * @since 2.9 */ public DefaultPrettyPrinter withSeparators(Separators separators) { _separators = separators; _objectFieldValueSeparatorWithSpaces = " " + separators.getObjectFieldValueSeparator() + " "; return this; }
public Separators withObjectFieldValueSeparator(char sep) { return (objectFieldValueSeparator == sep) ? this : new Separators(sep, objectEntrySeparator, arrayValueSeparator); }
/** * Method called after an array value has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate values. */ @Override public void writeArrayValueSeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getArrayValueSeparator()); }
/** * Method called after an object entry (field:value) has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. */ @Override public void writeObjectEntrySeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectEntrySeparator()); }
/** * Method called after an object entry (field:value) has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. */ @Override public void writeObjectEntrySeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectEntrySeparator()); }
public DefaultPrettyPrinter withSeparators(Separators separators) { _separators = separators; _objectFieldValueSeparatorWithSpaces = " " + separators.getObjectFieldValueSeparator() + " "; return this; }
public Separators withObjectEntrySeparator(char sep) { return (objectEntrySeparator == sep) ? this : new Separators(objectFieldValueSeparator, sep, arrayValueSeparator); }
/** * Method called after an object entry (field:value) has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. Pretty-printer is * to output a comma as well, but can surround that with other * (white-space) decoration. */ @Override public void writeObjectEntrySeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectEntrySeparator()); _objectIndenter.writeIndentation(g, _nesting); }
/** * Method called after an array value has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate values. */ @Override public void writeArrayValueSeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getArrayValueSeparator()); }
/** * Method called after an object field has been output, but * before the value is output. *<p> * Default handling will just output a single * colon to separate the two, without additional spaces. */ @Override public void writeObjectFieldValueSeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectFieldValueSeparator()); }
public static Separators createDefaultInstance() { return new Separators(); }
/** * Method called after an object entry (field:value) has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. Pretty-printer is * to output a comma as well, but can surround that with other * (white-space) decoration. */ @Override public void writeObjectEntrySeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectEntrySeparator()); _objectIndenter.writeIndentation(g, _nesting); }
/** * Method called after an array value has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. Pretty-printer is * to output a comma as well, but can surround that with other * (white-space) decoration. */ @Override public void writeArrayValueSeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getArrayValueSeparator()); _arrayIndenter.writeIndentation(g, _nesting); }
/** * Method called after an object field has been output, but * before the value is output. *<p> * Default handling will just output a single * colon to separate the two, without additional spaces. */ @Override public void writeObjectFieldValueSeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectFieldValueSeparator()); }
public Separators withArrayValueSeparator(char sep) { return (arrayValueSeparator == sep) ? this : new Separators(objectFieldValueSeparator, objectEntrySeparator, sep); }
/** * Method called after an object entry (field:value) has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. */ @Override public void writeObjectEntrySeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectEntrySeparator()); }
/** * Method called after an array value has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. Pretty-printer is * to output a comma as well, but can surround that with other * (white-space) decoration. */ @Override public void writeArrayValueSeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getArrayValueSeparator()); _arrayIndenter.writeIndentation(g, _nesting); }
/** * Method called after an object field has been output, but * before the value is output. *<p> * Default handling (without pretty-printing) will output a single * colon to separate the two. Pretty-printer is * to output a colon as well, but can surround that with other * (white-space) decoration. */ @Override public void writeObjectFieldValueSeparator(JsonGenerator g) throws IOException { if (_spacesInObjectEntries) { g.writeRaw(_objectFieldValueSeparatorWithSpaces); } else { g.writeRaw(_separators.getObjectFieldValueSeparator()); } }
public Separators withObjectFieldValueSeparator(char sep) { return (objectFieldValueSeparator == sep) ? this : new Separators(sep, objectEntrySeparator, arrayValueSeparator); }
/** * Method called after an object entry (field:value) has been completely * output, and before another value is to be output. *<p> * Default handling (without pretty-printing) will output a single * comma to separate the two. Pretty-printer is * to output a comma as well, but can surround that with other * (white-space) decoration. */ @Override public void writeObjectEntrySeparator(JsonGenerator g) throws IOException { g.writeRaw(_separators.getObjectEntrySeparator()); _objectIndenter.writeIndentation(g, _nesting); }