On Sep 26, 3:24=A0pm, Brian Candler <b.cand... / pobox.com> wrote:
> Thomas Sawyer wrote in post #1023829:
>
> > Is there any such thing as a JSON stream =A0equivalent to YAML document
> > streams?
>
> What CouchDB does for its continuous changes feed is just to send one
> JSON document per line, with a newline terminator. Then you can do:
>
> =A0 while line =3D gets
> =A0 =A0 data =3D JSON.parse(line)
> =A0 =A0 ... do something with data
> =A0 end
>
> Of course this means that the JSON you send must not be pretty-printed,
> and also any embedded newlines within strings are encoded as \n, which
> the JSON spec allows.

Awesome. That should work for my case too. If I need the data pretty
printed I use YAML anyway.

Thanks Brian.