JSON is just like HTML, its transfered by http protocol or its encrypted 
version https, only if you get it from a call thru websocket then you would be 
on websocket protocol which ofcourse both sides must support..

Sent from Samsung tablet



Ross Peoples <[email protected]> wrote:

I do it all the time. As long as you are connecting to the same server that you 
loaded the page from, then you are all set. This is how I normally make JSON 
requests:

var url = '{{=URL('some.json')}}/';
jQuery.getJSON(url).success(function(data) {
    // finished successfully
    alert(data);
}).fail(function(err) {
    // ajax failed
    alert(err);
});

There are many ways to do this, but this one seems to be the most robust for 
me, as it can catch connection and server errors.

Reply via email to