mirror of
https://github.com/vlang/v.git
synced 2025-09-11 00:20:26 -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)
|
s := json.encode(x)
|
||||||
println('Employee x: ${s}')
|
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)!
|
y := json.decode(Employee, s)!
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user