json: update the example in the module's README.md (#19544)

This commit is contained in:
felixmaker 2023-10-11 01:26:55 +08:00 committed by GitHub
parent 192d7dba04
commit 2ce209dac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ fn main() {
//
s := json.encode(x)
println('Employee x: ${s}')
assert s == '{"name":"Peter","age":28,"salary":95000.5,"title":2}'
assert s == '{"name":"Peter","age":28,"salary":95000.5,"title":"worker"}'
//
y := json.decode(Employee, s)!
//