I'm trying to deserialize a simple JSON object from an API.
The API returns the JSON in escaped quotes since the data represents a user's quote.
test("escaped quoted json test", () {
var s = '''{"quote": "\"a quote from a user\""}''';
var b = json.decode(s);
expect(b["quote"], "\"a quote from a user\"");
});
However this throws:
FormatException: Unexpected character (at character 13)
{"quote": ""a quote from a user""}
Btw the JSON is valid:
{"quote": "\"a quote from a user\""}
How do I tell Dart to handle this correctly?
Thanks in advance.
