HPCC-11246 Fix JSON encoding of invalid chars

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
HPCC-11246 Updated based on review

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Merge pull request #5868 from afishbeck/strangechars

HPCC-11246 Fix JSON encoding of invalid chars

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>