Update webserver.js

added support to handle 'broken' JSON