Sending Javascript functions using JSON and Java
I originally got my inspiration from this article on how to send Javascript functions over JSON and most of this work here is based on it.
By default every string attribute specified inside a JSON string is bounded by double quotes which works fine most of the time except when you are trying to pass a Javascript function in which case you have a string but it needs to be without double quotes.