Closed vpeil closed 11 years ago
hi vitali, that's intentional, the json exporter gives you line-delimited json. every line is a valid json doc, which enables easier stream processing, feeding of documents into mongodb, etc. that said, we should add an option to the exporter to output an array and make the importer use a streaming json parser so we can handle gigantic json arrays
On 28 Aug 2013, at 10:28, Vitali Peil wrote:
Using Catmandu::Exporter::JSON gives you something like that:
{name: "Catmandu", creator: "Nicolas"} {name: "Perl", creator: "Larry"} But for a valid JSON document it should be: [ {name: "Catmandu", creator: "Nicolas"}, {name: "Perl", creator: "Larry"} ]
— Reply to this email directly or view it on GitHub.
hi, yes every single line is a valid json doc. the array option and streaming parser sounds good.
On 28.08.2013 10:39, Nicolas Steenlant wrote:
hi vitali, that's intentional, the json exporter gives you line-delimited json. every line is a valid json doc, which enables easier stream processing, feeding of documents into mongodb, etc. that said, we should add an option to the exporter to output an array and make the importer use a streaming json parser so we can handle gigantic json arrays
On 28 Aug 2013, at 10:28, Vitali Peil wrote:
Using Catmandu::Exporter::JSON gives you something like that:
{name: "Catmandu", creator: "Nicolas"} {name: "Perl", creator: "Larry"} But for a valid JSON document it should be: [ {name: "Catmandu", creator: "Nicolas"}, {name: "Perl", creator: "Larry"} ]
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/LibreCat/Catmandu/issues/27#issuecomment-23399209.
Vitali Peil
Fachreferent
PUB
So this can be closed, right?
yeah, 6ee8a198fe0692188320bb16adbee4a545aca5f8
Using Catmandu::Exporter::JSON gives you something like that:
But for a valid JSON document it should be: [ {name: "Catmandu", creator: "Nicolas"}, {name: "Perl", creator: "Larry"} ]