api: change JSON mediatype to include charset

Fix #639.
Merge pull request #640 from uwescience/rest-json-encoding

api: change JSON mediatype to include charset