As per the JSON spec, raw control characters are not allowed in Unicode data. D correctly threw upon encountering them before 2.070.0. Test case: //////////////// test.d //////////////// import std.exception; import std.json; void main() { assertThrown(parseJSON("\"a\nb\"")); } //////////////////////////////////////// After 2.070, parseJSON returns nonsense data: writeln(parseJSON("\"a\nb\"").str) produces: a\u000Ab (i.e. the characters are "escaped" despite being decoded, not encoded). Introduced in https://github.com/dlang/phobos/pull/3872
https://github.com/dlang/phobos/pull/5511
Commit pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/55aa34e4407cd24a29f5e271a3fa318d56acf487 Fix Issue 17555 - [REG2.070.0] Control characters in JSON data are invalid and should cause an exception
Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/55aa34e4407cd24a29f5e271a3fa318d56acf487 Fix Issue 17555 - [REG2.070.0] Control characters in JSON data are invalid and should cause an exception
Commit pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/55aa34e4407cd24a29f5e271a3fa318d56acf487 Fix Issue 17555 - [REG2.070.0] Control characters in JSON data are invalid and should cause an exception