Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(csv) Allow to use multiple-characters delimiter to separate column: withColumnSeparator #14

Open
cowtowncoder opened this issue Mar 20, 2017 · 5 comments
Labels

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Mar 20, 2017

(from FasterXML/jackson-dataformat-csv#141 by @jefferyyuan)

It's common that we use multiple-characters delimiter to separate columns in CVS: such as: [|]
Sometimes, we have no choice as third-party defines the csv format like that.

Sample data:

FirstName[|]LastName[|]Address
John[|]Smith[|]123 Main St.

FasterXML/jackson-dataformat-csv#92 supports to use multiple characters as array element separator, It would be great if same can be done for withColumnSeparator.

I did some google search: seems there is no java library that supports use multiple-characters as the column separator.

But the C# CsvHelper does
https://github.com/JoshClose/CsvHelper

@nrapopor
Copy link

it's been two years -- any news?

@cowtowncoder
Copy link
Member Author

@nrapopor It's an OSS project so if you want to help, there are good ways to help. Asking "what's the ETA" is on bottom 5 list of helpful things.

FAQ: if there is progress, there will be update to issue.

@skill7899
Copy link

ORZ

@djay-S
Copy link

djay-S commented Nov 26, 2023

Hi @cowtowncoder ,
Instead of using
public CsvSchema withColumnSeparator(char sep){}
can we change it to
public CsvSchema withColumnSeparator(char[] sep).
and also changes the data type for _columnSeparator and other needed places.

Let me know of your suggestions.

@cowtowncoder
Copy link
Member Author

@djay-S Problem is not the method defining separator but implementation behind it -- splitting columns is very performance-sensitive operation, on critical path. So the real work is in decoder, to try to implement it in a way that has negligible performance penalty.
This is the real problem.

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

No branches or pull requests

4 participants