开发者

How to get the JSON Response so I can alert() for debugging

I need to JSON response string/object for debugging purposes. How can i get it?开发者_Go百科


Here you go:

alert(JSON.stringify(object));

That's everything I can give you, as you don't even provide a code example...


for this json:

[
    {                   
        "id": "1",
        "title": "All Day Event ", 
        "allDay": true,
        "start": "1283378679",
        "end": null,
        "url": "#",
        "className": "event-type-one",
        "editable": "true",
        "source": null,
        "description": "Sed enim et mauris purus nisi auctor, amet integer rhoncus, dapibus augue scelerisque."
    }

]

response string would be

$('#calendar').fullCalendar({
      events: "( your path to json )/events.json"
      alert(event.id);
      alert(event.title);
      alert(event.allDay); 
}); 

etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜