You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Since the append option (i.e.
flag: "a"
) injsonfile.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 withjsonfile.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.
The text was updated successfully, but these errors were encountered: