Parse error on JSON response containing URL value
The problem is with drupal_to_js() which is called by drupal_json() to do the job. drupal_to_js() will perform str_replace(array("\r", "\n", "&lt;", "&gt;", "&amp;"), array('\r', '\n', '\x3c', '\x3e', '\x26'), addslashes($var)) to every string it receives. Converting '&amp;' to '\x26' is making problem to me here. Anyway I cannot use json_encode() because of PHP dependency (Drupal 6).

I solved the problem by URL encoding the URL value on server side using PHP function urlencode() when preparing JSON data. And URL decoded it on browser side by JS function decodeURI().