I actually have a weirder problem. The code I posted earlier prints garbage on Windows and python 2.5 and the perfect json data on RHEL python 2.3.4. I'm so confused and helpless. json.py doesn't seem to help either. It says raise ReadException, "Input is not valid JSON: '%s'" % self._generator.all() Somebody please help!