HPCC-11246 Fix JSON encoding of invalid chars

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>