string to JSON parser

17 views
Skip to first unread message

CGS

unread,
Aug 18, 2012, 11:34:21 AM8/18/12
to Chromium-extensions
Hi,

Since the eval is considered unsafe in extension, does anyone have any idea for a workaround using pure JavaScript? I have one, but it seems rather complicated (using string manipulation) and I am looking for a simpler and more elegant one.

CGS

Scott Fujan

unread,
Aug 18, 2012, 11:39:04 AM8/18/12
to CGS, Chromium-extensions
JSON.parse() and JSON.stringify()


CGS

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.

CGS

unread,
Aug 18, 2012, 11:59:05 AM8/18/12
to Scott Fujan, Chromium-extensions
Yes, correct. I had an error in my script and I had the impression it doesn't work.

Thanks!

CGS
Reply all
Reply to author
Forward
0 new messages