zarqon
Well-known member
If you have a map thismap of string[string], and any one of those strings contains a double quote, the result of ASH's to_json(thismap) will end up corrupt since it does not escape quotes in the data.
I can write a routine to check all the strings for quotes and escape them before calling to_json(), but it seems like this is something that ought to be handled in the function itself. If Joe Scripter calls to_json() on some data, he would almost certainly expect the result to be valid JSON. He wouldn't expect the function to stop working if that data contained a certain punctuation mark.
I can write a routine to check all the strings for quotes and escape them before calling to_json(), but it seems like this is something that ought to be handled in the function itself. If Joe Scripter calls to_json() on some data, he would almost certainly expect the result to be valid JSON. He wouldn't expect the function to stop working if that data contained a certain punctuation mark.