On Thursday, 10 May 2018 at 17:59:26 UTC, jmh530 wrote:
On Thursday, 10 May 2018 at 15:01:57 UTC, rikki cattermole wrote:[snip]You'll need to unescape them (which is pretty easy, a simple replacement here).For reference, this is invalid json[0]: ``` { "1 2 3 " } ``` [0] https://jsonlint.com/I don't see an unescape function in phobos and below doesn't seem to workstring msg2 = parseJSON(msg)["markdown"].to!string.replace("\n", " ");
I used replace("\\n", "\n")