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

v0.2.0: handle multiple JSON structures #28

Merged
merged 7 commits into from
Mar 25, 2024
Merged

v0.2.0: handle multiple JSON structures #28

merged 7 commits into from
Mar 25, 2024

Conversation

ynqa
Copy link
Owner

@ynqa ynqa commented Mar 24, 2024

What?

  • Handle multiple JSON structures, such as jsonl

How to check

git clone https://github.com/ynqa/jnv.git
cd jnv
git checkout -b dev-0.2.0/jsonl origin/dev-0.2.0/jsonl
echo '{ "a": 123 }{ "b": 456 }' | cargo run

# Previously, running jnv on multiple JSONs like this was resulting in an error.
# echo '{ "a": 123 }{ "b": 456 }' | jnv
# Error: trailing characters at line 1 column 13

Resolves #14
Resolves #9

@corneliusroemer
Copy link
Contributor

This is great! IIUC, you are simply treating each line separately and then concatenating the outputs.

I tested and it works.

@ynqa ynqa marked this pull request as ready for review March 25, 2024 10:24
@ynqa ynqa merged commit c3f53a3 into main Mar 25, 2024
7 checks passed
@ynqa ynqa deleted the dev-0.2.0/jsonl branch March 25, 2024 11:13
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.

ENH: Support newline delimited JSON (ndjons/jsonl) Feature Request: Support JSON stream
2 participants