fix test/web-app.js, can now handle JSON