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

Allow multi-character separator values #92

Closed
dharaburda opened this issue Sep 29, 2015 · 1 comment
Closed

Allow multi-character separator values #92

dharaburda opened this issue Sep 29, 2015 · 1 comment
Milestone

Comments

@dharaburda
Copy link
Contributor

It would be useful if the array element separator could be defined using multiple characters (we frequently use ::). Seems reasonable to allow this for the column separator as well.

I am happy to make this change and submit a pull request.

It would be helpful to know what parts of the current API need to be preserved (and perhaps @Deprecated?). For example the inner classes CsvSchema.Builder and CsvSchema.Column are public, but don't appear to be intended for end-user use? I am assuming the method signatures on those could change without a problem. Obviously I would want to preserve mutant factory methods directly on CsvSchema.

It also appears that in this class at least, char[] is preferred? Using String would be a little more straightforward and also allow for an easy "disabled" value (empty string).

Thoughts? @cowtowncoder

@cowtowncoder
Copy link
Member

Actually both CsvSchema.Builder and CsvSchema.Column are exposed enough such that I don't think they can be changed without the usual deprecation route. How widely they are used I don't know, but I don't consider them internal implementation details.
But adding deprecation tags on methods would be fine.

I think that the best route would be to start with array separators, since that is what you need right now.
While column separators may be needed at some point there are more performance implications with that part, compared to allowing Strings for array separators.
I would be happy to merge such an improvement; and later on, if and as necessary, follow-up improvements.

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

No branches or pull requests

2 participants