On Mar 1, 2011, at 6:21 AM, Massimo Di Pierro wrote:
> 
> The problem is that not everything is json and rss serializable.

In that case, we ought to have a more helpful error than "no json". You're 
suggesting that the json encoding call is failing?

> What
> does your action look like?
> 
> On Mar 1, 5:18 am, darkblue_b <brian.darkbl...@gmail.com> wrote:
>> as per the very simple instructions, I wrote a controller function to
>> return a few items..
>> generic.html and generic.xml work, but generic.json and generic.rss
>> fail
>> 
>>   just learning still, I searched the newsgroup and found
>> 
>>> Lorin Rivers            Jan 13, 2:26 pm
>>> OK, if I specify which columns get returned in my rows, generic.json 
>>> returns "no json".
>>> If my function returns rows.as_list(), generic.json works, but my 
>>> generic.csv breaks.
>>> I figured out this, though, which seems to work, but I don't know if it's 
>>> wise. Also, it >doesn't seem like it should be necessary.
>>> def function():
>>>  dbset = db()
>>>  records = dbset.select(db.table.field1, db.table.field2, 
>>> orderby=db.table.field1)
>>>  otherrecords = records.as_list()
>>> Then in my generic.csv, I use records and in generic.json I use 
>>> otherrecords.
>>> --
>> 
>> does this apply ? is this a FAQ?
>> I would like to get to authenticated JSON next
>> thanks  -Brian


Reply via email to