couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joscha Feth (JIRA)" <>
Subject [jira] Created: (COUCHDB-604) _changes feed with ?feed=continuous does not return valid JSON
Date Mon, 21 Dec 2009 09:50:18 GMT
_changes feed with ?feed=continuous does not return valid JSON

                 Key: COUCHDB-604
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
    Affects Versions: 0.10
            Reporter: Joscha Feth

When using the _changes interface via ?feed=continuous the JSON returned is rather 

a stream of JSON documents than a valid JSON file itself:


to be valid there needs to be a root element (and then an array with commata) like in the
non-continuous feed:


in short this means that if someone does not parse the change events in an object like manner
(e.g. waiting for a line-ending and then parsing the line), but using a SAX-like parser (throwing
events of each new object, etc.) and expecting the response to be JSON (which it is not, because
its not {x:[{},{},{}]} but {}{}{} which is not valid) there is an error thrown.

I can see, that people doing this line by line might be okay with the above approach, but
the response is not valid JSON and it would be nice if there were a flag to make the response
valid JSON.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message