@Override
public String writeValueAsString(Object value)
throws JsonProcessingException {
// alas, we have to pull the recycler directly here...
SegmentedStringWriter sw = new SegmentedStringWriter(_jsonFactory._getBufferRecycler());
try {
JsonGenerator ge = _jsonFactory.createGenerator(sw);
// set ethereum custom pretty printer
EtherPrettyPrinter pp = new EtherPrettyPrinter();
ge.setPrettyPrinter(pp);
_configAndWriteValue(ge, value);
} catch (JsonProcessingException e) { // to support [JACKSON-758]
throw e;
} catch (IOException e) { // shouldn't really happen, but is declared as possibility so:
throw JsonMappingException.fromUnexpectedIOE(e);
}
return sw.getAndClear();
}