Properly escape JSON strings.