JSON output and Emscripten support