stateLoadCallback json format
stateLoadCallback json format
Hi!
since have multiple table and multiple users and need to save State for all of them I'm willing to save everything in a database table.
I formatted the State as follows (after deleting some info):
columns[0][visible]="true"|columns[1][visible]="true"|columns[2][visible]="true"|columns[3][visible]="true"|columns[4][visible]="true"|ColReorder[]="0, 1, 4, 3, 2"|length="216"|time="1444666842670"|start="0"|iScroller="0"|iScrollerTopRow="0"|order[0][]="0, asc"
but now I have to load State with stateLoadCallback, I understand I have to rebuild a json response but do not know exactly how to do it:
Can someone provide an example of how should be formatted such json file?
thanks
Alex
Answers
Got it..
just some tests..
If can be interesting for somebody.. this is the format:
object would be like this right? does mine look right?
no.. it is not a correct json answer:
you can validate here:
http://jsonlint.com/
answer is
Parse error on line 98:
...me": 1447101052821};
----------------------^
Expecting 'EOF', '}', ',', ']'
you have to avoid the ; at the end.
for the rest seems OK