My issue is that I have a very long string to parse (basically an object represented as a string), I'm trying to parse it manually without using eval, I've got more than 1000 lines of looping functions and I'm not even close to complete the algorithm.
I was checking how this was done in jQuery.metadata and they just used eval! my 1000 lines of code can be shrink to just an eval, but is this safe? I've heard that this function is not safe neither fast, but my algorithm is also slow considering all those loops and parsing.
e.g.
<button onajax="{reload:'#someitem',callback: function('somedata'),items:{1,2,3}}">
I need to set
var onajaxargs = {reload:'#someitem',callback: function('somedata'),items:{1,2,3}};