On Tue, Jul 30, 2013 at 2:14 PM, Alan Etkin <spame...@gmail.com> wrote:
> >> >> The question is: what should happen when a controller returns a list? The >> JSON serializer is happy to serialize a list. Is there any downside in >> doing it? Does it make any sense right now for a controller to return a >> list? >> > > It would be inconsistent with this documented part of the workflow > > "... If the action returns an iterable, this is used to loop and stream > the data to the client. ..." > > I suppose that the expected way to return json arrays is to add them to a > dictionary and then process them with a custom view (customize the generic > view). > > > So the advice is to make generic-list.json, and force that view, expecting that the input is in some format we decide upon. e.g. instead of returning sample_rpc_response, we return dict(result=sample_rpc_response)? Matt > -- > > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.