mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
db, json, time, term: change optional to result (#16201)
This commit is contained in:
@@ -4112,7 +4112,7 @@ println(user.last_name)
|
||||
println(user.age)
|
||||
// You can also decode JSON arrays:
|
||||
sfoos := '[{"x":123},{"x":456}]'
|
||||
foos := json.decode([]Foo, sfoos)?
|
||||
foos := json.decode([]Foo, sfoos)!
|
||||
println(foos[0].x)
|
||||
println(foos[1].x)
|
||||
```
|
||||
|
Reference in New Issue
Block a user