You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background:
We're in need for a fast and feature-rich CSV Parser and have zeroed-in on using jackson-dataformats-text library. We will be passing the 'Schema' object as an input (which is populated from a schema-file we receive from an upstream system). For each field, we will provide a 'Name' and 'Data Type'. Additionally, we would like to provide an input 'isRequired' so if a field is marked isRequired=true but there is no data in that field in the incoming CSV file, we need to raise an exception.
Requirement:
So far, we could not find support for 'isRequired' check. Please can you advise if this is already present or if not, could this be taken as a new requirement to add the feature in an upcoming release ?
Thanks.
The text was updated successfully, but these errors were encountered:
As things are, checks are only implemented for one special case: Creator properties. So if you define constructor or factory method like:
@JsonCreator
public MyType(@JsonProperty(required=true) String name), ....)
verification is made. Otherwise, if only passing via setters or assigned to fields, no check is made.
Challenge in this case is simply complexity of adding explicit state and tracking for properties; added overhead, and avoiding the overhead if no checks are needed. So it is a large undertaking. Perhaps it could be implemented for 3.0: this is something many users have requested.
Since this is covered by issue I linked to, will close this issue: I think support needs to go in databind and not dataformat modules. So closing issue here as a duplicate.
Background:
We're in need for a fast and feature-rich CSV Parser and have zeroed-in on using jackson-dataformats-text library. We will be passing the 'Schema' object as an input (which is populated from a schema-file we receive from an upstream system). For each field, we will provide a 'Name' and 'Data Type'. Additionally, we would like to provide an input 'isRequired' so if a field is marked isRequired=true but there is no data in that field in the incoming CSV file, we need to raise an exception.
Requirement:
So far, we could not find support for 'isRequired' check. Please can you advise if this is already present or if not, could this be taken as a new requirement to add the feature in an upcoming release ?
Thanks.
The text was updated successfully, but these errors were encountered: