Add SerializationFeature to Serialize Objects with toString() method
I can't find anything as this...
This Feature enables a default serialization (for Objects) calling their toString() method instead of launch error:
com.fasterxml.jackson.databind.JsonMappingException: CSV generator does not support Object values for properties (through reference chain: java.util.ArrayList[0]->***) at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:275) at com.fasterxml.jackson.dataformat.csv.CsvGenerator._reportMappingError(CsvGenerator.java:912) at com.fasterxml.jackson.dataformat.csv.CsvGenerator.writeStartObject(CsvGenerator.java:522) at com.fasterxml.jackson.core.base.GeneratorBase.writeStartObject(GeneratorBase.java:274) at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:151)
Thank you for suggesting this feature. It will be interesting to think how this could be implemented, given that this would either need to be configuration in jackson-databind to apply for some types, or, if here, how to implement it (since databind has no way to know specific rules are needed and will send tokens that CsvGenerator has to somehow reroute).