couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: View results JSON format
Date Tue, 01 Dec 2009 06:35:32 GMT
>> 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/

Actually, from Section 2 of http://www.faqs.org/rfcs/rfc4627.html:

"A JSON text is a serialized object or array"

Though most JSON parsers allow any bare JSON value as valid JSON. And
I consider this part of the spec to be a bug anyway.

HTH,
Paul Davis

Mime
View raw message