@Override
 public final void writeFieldName(SerializableString name) throws IOException {
   // Object is a value, need to verify it's allowed
   if (_writeContext.writeFieldName(name.getValue()) == JsonWriteContext.STATUS_EXPECT_VALUE) {
     _reportError("Can not write a field name, expecting a value");
   }
   _writeFieldName(name.getValue());
 }
 @Override
 public final void writeString(SerializableString sstr) throws IOException {
   _verifyValueWrite("write String value");
   if (!_skipValue) {
     if (_arraySeparator >= 0) {
       _addToArray(sstr.getValue());
     } else {
       _writer.write(_columnIndex(), sstr.getValue());
     }
   }
 }
Exemplo n.º 3
0
 public DefaultPrettyPrinter withRootSeparator(SerializableString rootSeparator) {
   if (_rootSeparator == rootSeparator
       || (rootSeparator != null && rootSeparator.equals(_rootSeparator))) {
     return this;
   }
   return new DefaultPrettyPrinter(this, rootSeparator);
 }
Exemplo n.º 4
0
 /** @since 2.1 */
 public String getRootValueSeparator() {
   return (_rootValueSeparator == null) ? null : _rootValueSeparator.getValue();
 }