From: Brian Candler Date: 2011-09-27T04:24:50+09:00 Subject: Re: JSON equivalent to YAML streams? Thomas Sawyer wrote in post #1023829: > Is there any such thing as a JSON stream equivalent 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: while line = gets data = JSON.parse(line) ... do something with data 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. HTH, Brian. -- Posted via http://www.ruby-forum.com/.