Sorry, I think this is a mistake on my part.
I am trying to convert a local plugin from Moodle 1.9 to Moodle 2. One of the scripts includes "/pear/HTML/AJAX/JSON.php", which in turn tries to load the missing file.
I'm told that Moodle 2 is PHP5 only, so the built in jason_encode() function should be available for all Moodle2 users. In turn, that means I don't need to include "/pear/HTML/AJAX/JSON.php" – thus the missing file doesn't matter. Indeed, I since commented out the require_once line for that file, and it's working fine with PHP's built-in json_encode.
However, it does beg the question as to why the old PHP4 JSON compatibility file is still there if it shouldn't be used. I suppose it should be removed, as well as the other file that's already gone, thus breaking it anyway.