feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Add ndjson FileAttachment reading capability

Open hrbrmstr opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. While .json() is useful for FileAttachment it does not handle newline-delimited JSON (ndjson). Handling it would save folks from having to either convert ndjson to a JSON array or uses a separate function after using FileAttachment(…).text().

Describe the solution you'd like To be able to just runFileAttachment(…).ndjson()

Describe alternatives you've considered I've been using a function in a small JS library I have, but I think this would be useful to the stdlib.

Additional context I've tossed together what this code might look like in this commit in a stdlib fork. I'd be glad to submit a PR, but the additions are fairly trivial to just replicate by someone.

hrbrmstr avatar Feb 28 '23 20:02 hrbrmstr