Closed fabiostrocco closed 7 years ago
Bump on this issue please, I am running into it as well.
class BadEncode {
String title;
String subtitle;
}
BadEncode be = new BadEncode()
..title = "Passion: Salvation’s Tide Is Rising"
..subtitle = "Here is a subtitle";
Dartson dson = new Dartson.JSON();
String encoded = dson.encode(be);
print (encoded);
The output is this (title runtimeType is _InternalLinkedHashMap):
{"title":{},"subtitle":"Here is a subtitle"}
The issue is with the apostrophe character used in this example (’). If I change it to (') it works as expected.
The following code fails