Fix getting attachment data of content-type application/json.