The correct behavior of encoding a String requires \n to be encoded, otherwise:
JavaScript:
{"header": "test
string"}
Dart (also PHP and everyone else in the Universe that does not have brain damage):
{"header": "test \\n string"}
JSON IS A STRING, not a map! json_annotations package is SOOOOOO wrong in this regard. A map is not a JSON. JSON is always string. Is a TEXT representation of a JavaScript object.
Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape.