Do not use json.dumps because otherwise the content-type is wrong