Adam Garbinski
Posts: 0
Joined: Sat Sep 28, 2013 5:33 pm

JSON response incomplete

Hi,

I use this code upon succesful query service execution to pass JSON response to local storage:

var JSONresponse = JSON.stringify(data);
localStorage.setItem("_Arttable_json_response", JSONresponse);

It worked fine so far, but today I am getting incomplete data after query execution. When I look inside my variable '_Arttable_json_response' at console local storage resources, I can see the data string ending like this:

-11-15 19:50:58.566"},{"_id":"52867b22e4

so it is definitely incorrect, and I can see the large part of response is missing.
No errors thrown on the console, however when I do:

console.log(JSONResponse) then I can see the whole dataset returned.

Browser cache flushed.

Do you have any ideas what might cause this problem? I haven't modified my data in database.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

JSON response incomplete

Hello! Could you clarify what browser you use to test? Is localStorage overfilled? Please try to clear it using prelocalStorage.clear()/pre and test app again.

Adam Garbinski
Posts: 0
Joined: Sat Sep 28, 2013 5:33 pm

JSON response incomplete

I use Chrome. No, it is not overfilled, flushed its cache and used localStorage.clear()
Please look here:

Image

Still, after executing my query I get incomplete data saved in local storage.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

JSON response incomplete

Please give us your public app link and tell how to reproduce the problem.

Adam Garbinski
Posts: 0
Joined: Sat Sep 28, 2013 5:33 pm

JSON response incomplete

The app is here:

http://appery.io/app/mobile-frame?src...

On the start screen simply press 'Get data' button. It will start service and load the results into this local variable:

_Arttable_json_response

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

JSON response incomplete

Hi Adam,

The cut line in console is just a developer console feature. Please try running the following code in console:preJSON.parse(localStorage.getItem("_Arttable_json_response"))/preYou'll see something like:preArray[863]/pre

Adam Garbinski
Posts: 0
Joined: Sat Sep 28, 2013 5:33 pm

JSON response incomplete

Katya,
You are perfectly right. I was testing something else and it turned out that the problem lied somewhere else, by coincidence only pointing to this local storage.
Thanks for checking and sorry for troubling.
Cheers,
Adam

Return to “Issues”