Skip to content

Commit 2d8d0f5

Browse files
committed
fix json code snippets
1 parent 4edf194 commit 2d8d0f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/packages/std/json.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ For example:
5555
```jule
5656
json := []byte(`{"ID":123,"Name":"John","Email":"[email protected]"}`)
5757
mut u := User{}
58-
json::Decode(json, u)!
58+
json::Decode(json, &u)!
5959
println(u)
6060
```
6161
In the example above, an instance of the `User` structure from previous example is decoded to variable `u` from the JSON representation.
@@ -77,7 +77,7 @@ For example:
7777
```jule
7878
json := []byte(`{"ID":123,"Name":"John","Email":"[email protected]"}`)
7979
mut v := json::Value(nil)
80-
json::Decode(json, v)!
80+
json::Decode(json, &v)!
8181
u := v.(json::Object)
8282
println(u["ID"])
8383
println(u["Name"])

0 commit comments

Comments
 (0)