Fix string escaping error resulting in bad JSON

The original library over-aggressively escapes some things, such as the
single quote. This brings the logic in-line with the latest iOS library