JSON fixes

restcontroller should output the same data as dbcontroller on the front
end
even more json fixes