mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
json: update the example in the module's README.md (#19544)
This commit is contained in:
parent
192d7dba04
commit
2ce209dac5
@ -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)!
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user