jquery - Returning JSON data to view page in ASP.NET MVC -
i'm working on mvc project , using jquery in view page data controller.
public jsonresult checkupdate() { dt = dt.addseconds(-100); iqueryable<tweet> _tweet = ttr.checktime(dt); return json(_tweet, jsonrequestbehavior.allowget); }
this method in controller gets data repository class , returns json view page, uses jquery it.
when run program , inspect in firebug, shows me error is:
a circular reference detected while serializing object of type 'tweettrafficreport.models.user'
my question is
- is correct return json data iqueryable type
- how can use json data in view page , not error above
thanks ur :)
the circular reference bet because of fact have tweet object reference inreplyto
iqueryable isnt big issue casting each tweet jsoncapabletweet hanselman http://nerddinnerbook.s3.amazonaws.com/part11.htm
however lolok @ way twitter
http://search.twitter.com/search.json?callback=foo&q=twitter
thats pretty nice json return, matching yours theirs habit have
Comments
Post a Comment