I solved the problem by encoding the string as a JSON string. One easy way to do that would be to use JSONObject from the json-simple API.
JSONObject inputJson = new JSONObject();
inputJson.put("sign", reading.getSign());
inputJson.put("date", reading.getDate());
inputJson.put("month", reading.getMonth());
inputJson.put("year", reading.getYear());
inputJson.put("reading", reading.getReading());