jackson-dataformats-text
jackson-dataformats-text copied to clipboard
Add `.ignoreProperty()` to csv builder
I would love to add fieldnames that should be ignored, like:
mapper.schemaFor(ExternalEntity.class).withHeader().ignoreProperty('id');
I know the @JsonIgnore
annotation, but that requires modifying the target class, which is not always possible.
Thus, a configuration setter would be required.
While I can see why it might be convenient, conceptually this is bit different from what CsvSchema
is meant to define: mapping of column positions to logical name, type.
Still, I can see how some variation would perhaps make sense... would just need to think of how it maps nice to the model. I guess the idea is that definition of ignoral would essentially "hide" column value so that Databind would not see key/value pair at all.
Hi,
I have raised a PR for this issue: https://github.com/FasterXML/jackson-dataformats-text/pull/418
Can you please review and suggest?
@membersound Can you check out #418 to see if that does what you want? It seems to me that it wouldn't (does something bit different) but I would like to know for sure.
@cowtowncoder Can you have a look at my changes for #418.