lintJson property
String
get
lintJson
Implementation
String get lintJson {
return replaceAllMapped(
regIllegalJsonChar,
(match) =>
'\\u${match.group(0)?.codeUnitAt(0).toRadixString(16).padLeft(4, '0')}',
)
.replaceAllMapped(
regMarkupJsonChar,
(match) =>
'\\u003C${match.group(0)?.substring(1, match.group(0)?.length ?? 0 - 1)}\\u003E',
)
.replaceAllMapped(regNextlineJsonChar, (match) {
if (match.group(0) == '\r') return '\\r';
if (match.group(0) == '\n') return '\\n';
if (match.group(0) == '\t') return '\\t';
if (match.group(0) == '\\') return '\\\\';
return match.group(0) ?? match.input;
})
.replaceAll(regNextlineJsonChar, '')
.replaceAll("'", '\\u0027');
}