-
-
Notifications
You must be signed in to change notification settings - Fork 151
Open
Labels
Description
I am trying jackson CSV feature, but I have some question:
-
Seems
CsvMapper
extendsObjectMapper
.
I think it's not possible define CsvMapper as Bean without touch Spring ObjectMapper bean? -
CSV feature reuse many JSON annotation, is it possible have different config for CSV/JSON in the same POJO?
For example:
If I want ignore a field in CSV only, I put@JsonIgnore
on the field.
But it will affectObjectMapper
process that POJO too. -
Use the same config for both CSV and Json.
Mainly for have same behave for convert Java 8 time, locale...etc
But I don't find something likesetConfig(json.getConfig())
, so I try to config one by one by myself.
csvMapper.findAndRegisterModules();
csvMapper.setConfig(jacksonObjectMapper.getSerializationConfig());
csvMapper.setConfig(jacksonObjectMapper.getDeserializationConfig());
//do other config in CSV only
Is this enough?
I don't find any issue for now though.
mehdicharife