$.getJSON('/?dev=server&cmd=addDevice&val=' + JSON.stringify(newDevice), function (data) {

        if (!data) {
            return;
        }