I have the following in my intl_en.arb file:
"title_chef_selection": "Chef's Selection",
"@title_chef_selection": {},
And I get this error: Error: Unbalanced escape quotes. To escape a single quote ', prefix it with another single quote.(mismatched_brackets)
I followed it’s advice changing it to this:
"title_chef_selection": "Chef''s Selection",
"@title_chef_selection": {},
This shows two single quotes in Text(S.of(context).title_chef_selection)
I just tried this one:
"title_chef_selection": "Chef's Selection",
"@title_chef_selection": {},
I get this error: Invalid escape character in string.json(261)
, but it works and the text shows properly. Is there a different way of doing it or a way to get rid of the error?
2
Answers
Single quotes need not be escaped in JSON. Only double quotes needs to be escaped. This might be due to the issue in some other line. Will you be able to share the whole code
I solved disabling the Arb extension in Visual Studio Code.