Simple JSON API

when sending json, use the .json method instead of .send or set the response header 'Content-Type' to 'application/json'