rest-gen/node.js: Fix parsing of json responses