escape characters in json values

Signed-off-by: Roy Storey <roy.storey@plantandfood.co.nz>