The JSON format natively doesn\'t support binary data. The binary data has to be escaped so that it can be placed into a string element (i.e. zero or more Unicode chars in d
(Edit 7 years later: Google Gears is gone. Ignore this answer.)
The Google Gears team ran into the lack-of-binary-data-types problem and has attempted to address it:
Blob API
JavaScript has a built-in data type for text strings, but nothing for binary data. The Blob object attempts to address this limitation.
Maybe you can weave that in somehow.