couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <...@apache.org>
Subject Re: Appending "\n" and pretty printing output from the command line using curl (with a smidge of python)
Date Fri, 22 Aug 2008 07:42:08 GMT

On Aug 22, 2008, at 00:58, Noah Slater wrote:

>>> Pretty-printing OTOH... I don't think it's worth it.
>
> +1
>
> On Fri, Aug 22, 2008 at 12:29:46AM +0200, Jan Lehnardt wrote:
>> So this should be done on the client, in my opinion. Nothing stops
>> us from shipping a newlineadding and prettyprinting CouchDB client,
>> but i don't think that should be in the server.
>
> -1
>
> Pretty printing can be separate, but we really should be appending a  
> newline to
> JSON responses. If nothing else it makes the output files POSIXly  
> correct.

If anything, we should be talking HTTP by the spec. RFC 2616 nowhere  
states
that the the message or the body part of a request should end in a  
newline. Adding
a newline would effectively alter content which in turn potentially  
breaks clients.

We could try and guess if a "human user-agent" is making the request  
but I
doubt that we can make that reliable.

We could further add a ?make_json_pretty=true parameter but I think that
defeats the purpose.

Cheers
Jan
--

Mime
View raw message