Skip to content
New issue

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

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

Already on GitHub? # to your account

Trimming of values differently implemented in JSON versus CSV export #28

Open
sgoeschl opened this issue Nov 8, 2021 · 3 comments
Open
Milestone

Comments

@sgoeschl
Copy link
Contributor

sgoeschl commented Nov 8, 2021

I'm working with fixed-with column and some of the values are variable-length strings (also having spaces) and they could be left or right-aligned.

In theory it is possible to come up with a regex trimming the unwanted spaces but in reality it is hard since the regexp becomes hard to maintain (and I have many of them)

Depending on the output format

  • JSON - the values are NOT trimmed
  • CSV - the values are trimmed

Would it make sense to trim the value in general? Our should/could this be a setting (global, field level)?

@daniel-bray-sonalake
Copy link
Collaborator

Would it make sense to trim the value in general?

We had thought of this, but were a little cagey about second-guessing the config files. So we chose to always trust the regex.

This seems like a very specific use case; can you explain what kind of config you're thinking of?

@daniel-bray-sonalake daniel-bray-sonalake added this to the V1.1.1 milestone Nov 9, 2021
@sgoeschl
Copy link
Contributor Author

sgoeschl commented Nov 9, 2021

Actually not thinking of anything - asking for your feedback :)

In my case I am generating CSV or HTML (based on the CSV) using FreeMarker templates

@daniel-bray-sonalake
Copy link
Collaborator

Let us ponder this one a little

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

No branches or pull requests

2 participants