Anyone working with NDJSON? also called "JSON Lines" or "Newline Delimited JSON"

“Newline Delimited” JSON.

To be honest, I just came across NDJSON while looking through the specs for the FHIR data required for the US Federal Government’s current UDS+ reporting requirements:

A bunch of JSON stuff combined in a single file.
Can skip over/ignore any badly-formed JSON components.

It’s also called JSON Lines

I’ve come across it while mucking about with barcode data, but done little with it.

if using the Capesoft stuff then perhaps you could simply split on the line endings using ST then process each line using jFiles.

something along these lines:

loop x = 1 to st.records()
  ! process json...

or maybe it is more complicated than that?


Geoff R
*edit: added removeLines after split (gets rid of any blank lines)

From my reading of the spec it’s pretty much as Geoff describes.

It’s just a bunch of JSON “documents”, concatenated together using CRLF, or just LF, if you prefer.

When creating the JSON with jFiles just make sure fornatting is off.

And concatenate using StringTheory AddLine, or SaveFile with Append switch.

Thanks, guys. (At least 20 characters’ worth of text to be sure the appreciation is appropriately expressed.)