-
Notifications
You must be signed in to change notification settings - Fork 76
Allow specifying custom String placeholder to use when a POJO would serialize as Object
#85
Comments
I think that what you want to use is:
(despite term which should behave such that write is effectively ignored. I am not sure exactly how your definition is mismatching (perhaps it is difference between interface used for constructing |
One other feature that may prove useful for CSV as well as other formats is to define so-called "any setter" (see |
Hmmh. Look at that: decided to check |
I think it is still a good idea to allow use of a placeholder value, similar to have In the meantime, skipping of unknown properties, including Object-valued (Structured POJOs) will work with 2.7.0. |
Object
Object
Object
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.
Thanks :)
The text was updated successfully, but these errors were encountered: