couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: VOTE: accept newline patch into CouchDB for 0.9
Date Sat, 31 Jan 2009 21:42:03 GMT
+1 for the patch, namely, adding a single newline at the end of all
couchdb-generated JSON documents and responses.

- more convenient for command-line HTTP client use
- more convenient for saving and editing documents off-line
- more convenient for concatenating multiple responses into a single file

- miniscule bandwidth penalty
- err, that's it

Any conformant(*) JSON parser will accept the newline, and in any case we
already insert some arbitary newlines within certain query responses, so we
are relying on clients having this capability.

I don't think HTTP specs are important here. This is application/json, not
text/json. In any case we may return JSON with arbitrarily long line

Having the newline is just a feature which (IMO) can make couchdb data a
little friendlier for its consumers.

One might argue whether it should be \n or \r\n though :-(



(*) says "Whitespace can be inserted between any pair of
tokens", without making it clear if end-of-file is a token, but RFC 4627 is
much clearer.

View raw message