properly encode tweet JSON for sentiment analyzer