ndjson-cli icon indicating copy to clipboard operation
ndjson-cli copied to clipboard

Allow blank lines?

Open mbostock opened this issue 9 years ago • 2 comments

The ndjson specification suggests that parsers should have an option for allowing (and ignoring) blank lines. It doesn’t explicitly specify the definition of an “empty line” but I’m guessing an all whitespace line is also ignored.

mbostock avatar Sep 09 '16 14:09 mbostock

alternatively, grep -vE '^\s?$' file | ndjson-*

ashander avatar Feb 02 '17 03:02 ashander

thank you for this great tool (and idea!), it would make data processing easier. But, could you please at least spell out a more user friendly error when newline is encountered? I had some semi-human readable json that failed to convert, and it took me a long long time to find that i have to filter thru json5 to rid the white space before ndjson-split would work. Thanks!

tin6150 avatar Apr 19 '20 00:04 tin6150