I think this is reasonable. The grid eval the string and there is no other way to determine if this is a function. If it is a quted it is interpreted as string. Any idea on how to resolve this will be helpful. Also it is easy when we use xml – in this case the function is enloased in CDATA.
Well, you always have an option to write your own json writer, which will build json string with your rules. When you look at english online manual, in comments to function json_encode, there are already some nice looking replacements, which you can eventualy extend for your needs. This core function is for simple types only with no extensibility.
I was solving this problem just today in my asp.net application, it was really easy.
I know this topic is a bit older, but I was having the same problem with json_encode and javascript functions. After a little searching, I found this solution: