/** * @since 2.9 */ public DefaultPrettyPrinter withSeparators(Separators separators) { _separators = separators; _objectFieldValueSeparatorWithSpaces = " " + separators.getObjectFieldValueSeparator() + " "; return this; }
public DefaultPrettyPrinter withSeparators(Separators separators) { _separators = separators; _objectFieldValueSeparatorWithSpaces = " " + separators.getObjectFieldValueSeparator() + " "; return this; }
/** * 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()); }
/** * 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()); }
/** * 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()); } }
/** * 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()); } }
/** * @since 2.9 */ public DefaultPrettyPrinter withSeparators(Separators separators) { _separators = separators; _objectFieldValueSeparatorWithSpaces = " " + separators.getObjectFieldValueSeparator() + " "; return this; }
/** * 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()); }
/** * 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 void writeObjectFieldValueSeparator(JsonGenerator gen) throws IOException { if(_spacesInObjectEntries) { gen.writeRaw(syntaxHighlighter.forWhitespace()); gen.writeRaw(' '); gen.writeRaw(syntaxHighlighter.forColon()); gen.writeRaw(_separators.getObjectFieldValueSeparator()); gen.writeRaw(syntaxHighlighter.forWhitespace()); gen.writeRaw(' '); } else { gen.writeRaw(syntaxHighlighter.forColon()); gen.writeRaw(_separators.getObjectFieldValueSeparator()); } if(valueColor != null) { gen.writeRaw(valueColor); valueColor = null; } }