javascriptjsongwtjsni

Convert String to JSON object in GWT (JSNI)


How to convert a string to a JSON object that I'll use inside JSNI? Thank you.


Solution

  • You should look at gwt core JsonUtils which has a safeEval method for the string. You should define a JavaScript Overlay Object for use with the result or you could work with the object in JSNI as you seem to want to.