Just a heads-up that I've implemented two JSON output methods for records in the PHP File_MARC library as of release 0.6.0:
* toJSONHash() returns JSON that adheres to Bill Dueber's proposal for the array-oriented MARC-HASH JSON format at http://robotlibrarian.billdueber.com/new-interest-in-marc-hash-json/
* toJSON() returns JSON that adheres to Ross Singer's proposal for an object-oriented JSON format (I could only find a sample at http://gist.github.com/511752 - not sure if there's a broader description anywhere, but really -- who needs it?)
The use of the json_encode() function bumps the minimum PHP version requirement for File_MARC up to 5.2.x from 5.1.x, which kind of sucks, but given that PHP 5.2.0 was released in 2006, I think it's worth it.
You can install File_MARC using the 'pear' command on most environments as follows:
pear install File_MARC-beta