stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

Add FileAttachment().jsonl() support

Open gisle opened this issue 2 years ago • 0 comments

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)))

gisle avatar Jun 20 '22 10:06 gisle