Add Support for jQuery Callback Function

Sometimes php's json_encode function does not support jQuery's callback method.