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

Verify CSV headers are in the order as expected #97

Merged
merged 1 commit into from Nov 4, 2015

Conversation

nickbabcock
Copy link
Contributor

While I enjoy the flexibility of having the columns in any order, I happen to have the requirement that I need columns in a specific order, and if the headers don't arrive in that order, I want to fail fast. This pull request allows users to enable a feature strictHeaders

Just wanted to present my idea. I'm more than happy to work with you if you want the feature and have suggestions for it. Alternatively, if there is an easy workaround, I'd love to hear about it.

@cowtowncoder
Copy link
Member

Sounds like a reasonable request to me; I'll need to check the contribution just to make sure. Looks fine with first look, and it's great to have unit test(s) associated.

@cowtowncoder
Copy link
Member

@nickbabcock One thing we need before merging the first contribution is the Contributor License Agreement (CLS), from:

https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf

The usual way is to download and print it, fill & sign, scan and email to info at fasterxml dot com.
Once this is done it's valid for all contributions over Jackson projects, so it's just a one-time hassle.

Looking forward to merging this feature; it will go in Jackson 2.7 as it is an addition to API.

@cowtowncoder cowtowncoder added this to the 2.7.0 milestone Nov 4, 2015
cowtowncoder added a commit that referenced this pull request Nov 4, 2015
Verify CSV headers are in the order as expected
@cowtowncoder cowtowncoder merged commit b437278 into FasterXML:master Nov 4, 2015
@cowtowncoder
Copy link
Member

Good stuff, merged.

One question: I noticed naming discrepancy between setStrictHeaders and withStrictColumns.
Which one should be used? I can make the change in one (or both, if an even better name is found).

cowtowncoder added a commit that referenced this pull request Nov 4, 2015
@nickbabcock
Copy link
Contributor Author

Oops, yeah I want to go with "strict headers", strict columns is a name I had given it previously. Thanks for the fix. 😊

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants