Skip to content

Commit febc429

Browse files
committed
- update documentation on serialization
1 parent 2752136 commit febc429

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1304,13 +1304,13 @@ import (
13041304

13051305
func main() {
13061306
list := arraylist.New()
1307-
list.Add("a", "b", "c")
13081307

1309-
json, err := list.ToJSON()
1308+
json := []byte(`["a","b"]`)
1309+
err := list.FromJSON(json)
13101310
if err != nil {
13111311
fmt.Println(err)
13121312
}
1313-
fmt.Println(string(json)) // ["a","b","c"]
1313+
fmt.Println(list) // ArrayList ["a","b"]
13141314
}
13151315
```
13161316

0 commit comments

Comments
 (0)