I would like to see support for new-line separated JSON, either by adding another method to FileAttachment() or by adding some option to the json() method.
For instance the Python Panadas library has implemented this with a lines = True option to their read_json() function.
My current ugly workaround is to add this to my Observable notebook:
data = FileAttachment("data.jsonl").text()
.then(content => content.split("\n").filter(line => line).map(line => JSON.parse(line)))
I would like to see support for new-line separated JSON, either by adding another method to
FileAttachment()
or by adding some option to thejson()
method.For instance the Python Panadas library has implemented this with a
lines = True
option to theirread_json()
function.My current ugly workaround is to add this to my Observable notebook: