ndjson / ndjson-spec

Specification
680 stars 29 forks source link

Relation to mongodb export/import #20

Open jeroen opened 9 years ago

jeroen commented 9 years ago

Are you aware that the mongodb database uses newline delimited json for exporting/importing (potentially large) datasets? See for example zips.json. How does this relate to ndjson? Can the mongoimport be considered an ndjson parser?

It might be helpful to cross-reference them somewhere. I asked for a term for this format a while ago and nobody pointed me to ndjson.

I have also implemented a stream parser for this format in R in the jsonlite package.

finnp commented 9 years ago

Thank you for pointing this out. Yes the format is already used a while and this standard tries to give it a name. json is clearly a bit confusing, since no JSON parser will parse consecutive JSON objects.

We should probably try to reach out to mongodb about this. It would be good to have them mention it there.

Would you consider publishing stream_in and stream_out as a ndjson R package? Or maybe at least mention ndjson in the documenation? Then we could link your impementation as the reference implementation for R somewhere.