Page 1 of 1

Saving the entire JSON response to local storage

Posted: Sun Apr 22, 2012 11:26 am
by KevRead

How can I save the whole JSON response BLOB into a single local storage variable.

Any hints?

I assume it will be some JS in the Success event but hwo can I access the response BLOB?


Saving the entire JSON response to local storage

Posted: Sun Apr 22, 2012 3:01 pm
by maxkatz

One way is during service to page mapping. Take the root of the response structure and save it into local storage in JavaScript function: Something like this:

code
var r = JSON.stringify(value);
localStorage('key', r);
/code

http://help.gotiggr.com/documentation...

As you suggested you can use service's success event as well: http://help.gotiggr.com/documentation...

It shows how to handle errors but you would handle any other logic using success event in the same fashion.


Saving the entire JSON response to local storage

Posted: Fri Dec 27, 2013 8:34 pm
by Jason Baird

Hmmm, I found this link and did it, but it seems to only be storing one response although I put the code in the js area that is mapped from $


Saving the entire JSON response to local storage

Posted: Fri Dec 27, 2013 8:36 pm
by maxkatz