Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

Inject "missing" trailing columns as nulls (CsvParser.Feature.INSERT_NULLS_FOR_MISSING_COLUMNS) #137

@Schaka

Description

@Schaka

Imagine the following scenario:

  • you have a CSV with 8 columns
  • your POJO has 9 fields

All 8 fields are filled, but the 9th, missing field is completely ignored. The setter is never called.
I would expect the setter to be called, so that I can use some custom validations, but it seems none of the DeserializationFeatures allow for this.

Is there any way to throw an exception if the length doesn't matter, or to automatically treat missing fields as null values (or throw an exception for them), currently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions