mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
json2: unescape characters (#6836)
This commit is contained in:
committed by
GitHub
parent
c8b7cfc297
commit
fe3d2a9aba
@@ -7,7 +7,11 @@ import strings
|
||||
|
||||
fn write_value(v Any, i int, len int, mut wr strings.Builder) {
|
||||
str := v.str()
|
||||
wr.write(if v is string { '"$str"' } else { str })
|
||||
if v is string {
|
||||
wr.write('"$str"')
|
||||
} else {
|
||||
wr.write(str)
|
||||
}
|
||||
if i >= len-1 { return }
|
||||
wr.write_b(`,`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user