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

Add support for JSONL format #121

Closed
marycourtland opened this issue Aug 15, 2019 · 3 comments
Closed

Add support for JSONL format #121

marycourtland opened this issue Aug 15, 2019 · 3 comments

Comments

@marycourtland
Copy link

Since the append option (i.e. flag: "a") in jsonfile.writeFile simply appends the new JSON object to the end of the file, it produces a file which is compatible with the JSONL format. It would be convenient if this file was readable with jsonfile.readFile, which would return an array of the objects in the file.

The only catch is that JSONL requires each line to be valid JSON. This means that it's incompatible with the spaces formatting option.

I think it would be best to require an explicit option to be passed to readFile, rather than implicitly detecting the format. (E.g. format: "jsonl")

Related issue: #52 (and many other closed issues).
This is not suggesting the same functionality, but it solves the same problem.

@RyanZim
Copy link
Collaborator

RyanZim commented Aug 15, 2019

We'd have to have a jsonl option for writeFile for writing out an array in jsonl format for creating new jsonl files.

@RyanZim
Copy link
Collaborator

RyanZim commented Jan 30, 2020

@jprichardson what are your thoughts here? Is this out of scope?

@jprichardson
Copy link
Owner

what are your thoughts here? Is this out of scope?

yes

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

No branches or pull requests

3 participants