Results 1 to 5 of 5
  1.    #1  
    I am requesting a JSON file via a URL query. In a browser, using the URL, I am returned a JSON file with the correct amount of data. I use the same URL with an Ajax.Request and receive only a very small portion of that returned in the browser. Is there a string limit in WebOS or am I missing a parameter. Thanks in advance for any suggestions. regards, James

    Code:
    Assistant.prototype.makeRequest = function(){
     	url="...";
     	new Ajax.Request(url, {
     		method: 'get',
     		requestHeaders: {
     			Accept: 'application/json'
     		},
     		onSuccess: function(transport){
    			Mojo.Log.info('...........got it..............');
     			var json = transport.responseText;
    			Mojo.Log.info('........JSON.....................',json);
     		}
     	})
     };
  2. #2  
    var json = transport.responseText.evalJSON()

    is what is should be i believe
  3. #3  
    I think Mojo.Log only outputs so many characters.
  4.    #4  
    Quote Originally Posted by oil View Post
    I think Mojo.Log only outputs so many characters.
    Thanks - After some experiments, yes Mojo.Log.info has an output limit. And it matches the partial amount of json data being logged by Mojo.Log.info regards, James
  5.    #5  
    Quote Originally Posted by mt3ck View Post
    var json = transport.responseText.evalJSON()

    is what is should be i believe
    thanks, .evalJSON got the data in to a usable object. James

Posting Permissions