Encode JSON using UTF-8.