proper escaping of json strings