Skip to content

Commit

Permalink
As per json spec, there is no need to escape a single quote
Browse files Browse the repository at this point in the history
  • Loading branch information
charann01 authored Aug 24, 2024
1 parent c11f840 commit ddd9ff3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ open class Json {
b.append('"')
for (c in str) {
when (c) {
'\\' -> b.append("\\\\"); '/' -> b.append("\\/"); '\'' -> b.append("\\'")
'\\' -> b.append("\\\\"); '/' -> b.append("\\/");
'"' -> b.append("\\\""); '\b' -> b.append("\\b"); '\u000c' -> b.append("\\f")
'\n' -> b.append("\\n"); '\r' -> b.append("\\r"); '\t' -> b.append("\\t")
else -> b.append(c)
Expand Down

0 comments on commit ddd9ff3

Please sign in to comment.