On Wednesday, January 4, 2017 at 4:21:35 PM UTC, Anthony wrote: > > Presumably you are relying on the generic.json view. Note, the only way > for a view to be triggered is for the controller to return a dictionary, > but of course that means the generic.json view will be converting a > dictionary to JSON -- there is no way to have it receive and convert a list > to JSON. So, you must instead create your own custom JSON view, or more > simply, just return JSON directly from the controller. So, instead of: > > return dict(content=list_of_records) > > do: > > return response.json(list_of_records) > > Anthony > > On Wednesday, January 4, 2017 at 8:21:52 AM UTC-5, PK wrote: >> >> >> <https://lh3.googleusercontent.com/-4t1AwS6IGqU/WGz2i63928I/AAAAAAAAACM/kWTXC_0piTgITvWyn-XQM6teWOjjeiWjACLcB/s1600/Good.PNG> >> Can i remove "content" from restapi return json ? >> it gives a little trouble when i m trying to get or post json object. >> > Thank it help me A Lot
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.