couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Binns <rog...@rogerbinns.com>
Subject Re: View results JSON format
Date Tue, 01 Dec 2009 06:31:10 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anh wrote:
> Basically, I'd like to format view results to look like simple JSON objects:
> 
> ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]

That is not valid JSON.  JSON requires an object (of which an array could be
a member):

  http://www.json.org/

However CouchDB does have functions for formatting lists so you can just use
them instead.

  http://books.couchdb.org/relax/design-documents/lists
  http://wiki.apache.org/couchdb/Formatting_with_Show_and_List

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksUuC4ACgkQmOOfHg372QS/VgCfabIHXV7kfP7VXTrtIM6nA4Sn
ucwAnRus18oTmydjsa+FmIhVcWjEdA2m
=064N
-----END PGP SIGNATURE-----

Mime
View raw message