Ensure JSON data for POST/PUT is a dict.