Since NaCl uses a messaging system between the browser and the module I thought that serializing objects to / from JSON would be a good way to communicate with the javascript. I am using this library: http://code.google.com/p/pjson/ because it was the only one that I found that I could get to compile along with Pepper15.
It seems to work, however with really large messages (>20K) it seems to crash. I'm trying to use NaCl for a WebGL project which won't have the actual opengl being done in NaCl, I just wanted to do the vertex processing. This ends up having huge amounts of data passed back and forth. I don't think it's a limit on the NaCl/Pepper postMessage method.
Anyone else using JSON in NaCl that might have a better library or some insight?