using JSON.stringify(...) and JSON.parse(...)

see
http://lists.jboss.org/pipermail/keycloak-user/2014-December/thread.html
#1355
Merge pull request #891 from nilspreusker/ie9-compatibility

IE9 Compatibility