Don't let Text.GenJSON mess up UTF-8 strings
Closes #69 (closed)
If I understand the spec correctly, UTF-8 sequences are either a single printable ASCII character or a sequence of only non-printable non-control ASCII characters. So we can safely escape control characters without worrying that they can occur in a UTF-8 sequence.
To do:
- Check that iTasks doesn't rely on being able to transmit binary data in JSON (→ iTasks-SDK!294 (merged)).
- Update documentation.
-
Try if a separate constructor next to
JSONString
which is guaranteed to not need escaping speeds up encoding significantly. This could be used in places where the data has already been encoded, for example with base64.