The various blocks of code that build up JSON in RESTClient.java do not escape the strings added to the overall JSON string. This was discovered by adding a JQL query that had double quotes in it. The REST API returned a 400:
Failed with 400: project=TEST AND text~"Customer Reported Bug"
Worked: project=TEST AND text~\"Customer Reported Bug\"
It looks like this is an issue with all JSON string building.