make server respond with json (thanks jiffy!)