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

support jsonl encoder option #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

imishinist
Copy link

@imishinist imishinist commented Aug 1, 2023

To support jsonl in usql, we added support for jsonl format to tblfmt.

@kenshaw
Copy link
Member

kenshaw commented Aug 1, 2023

@imishinist I appreciate the work on this. Can you tell me what the specific use for this would be? I wrote tblfmt primarily because of usql, but note that usql has JSON output (it just uses the standard library).

My concern here is that the JSON standard is actually much more complicated than most people realize, especially with regards to character/UTF8 encodings.

@jduhamel
Copy link

@kenshaw Just wanted to let you know that it's really a great option. I use this a bunch with usql, added jsonl as a print format.

One of the big problems with json as a output is that it doesn't print a newline after the record so many JSON tools can get overwhelmed with a decent sized table. jsonl makes it far more tractable.

I wish I could have figured out to have the json format add a NL after the recordsep, (I can see it in there just wans't sure how to set it)

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

Successfully merging this pull request may close these issues.

3 participants