FasterXML / FasterXML/jackson-dataformats-text
Allow specifying custom String placeholder to use when a POJO would serialize as `Object`
- Dominant language
- Java
- Stars
- 455
- Forks
- 164
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 2
Description
(from https://github.com/FasterXML/jackson-dataformat-csv/issues/85 by @MattFriedmanAfilias)
When an object is encountered when writing CSV, the library throws an exception.
Problem: The model might be changed and an object field could be introduced. In this case, the developer will not necessarily update any tests to include the new field.
If that happens the error may only be detected at runtime. We want to detect such problems sooner, or avoid them altogether.
It should be possible to detect the error sooner, or to introduce a setting that would cause the exception to not be thrown and to provide instead some default behavior.
Such behavior might be to simply print "Object" or "n/a" when an object is encountered, rather than throwing an exception; a log message warning about this might be useful too.
The developer should be in control of this setting IMO. The library should make it possible for the developer to decide on the behavior rather than only throwing an exception for this scenario.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the CSV-writing path where an object is encountered and the exception is thrown; the issue names no files or tests. Clarify the configuration API and fallback behavior with the existing maintainers, then add coverage showing the selected placeholder is used instead of the exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100