aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index dddcf6c..455ce08 100644
--- a/README.md
+++ b/README.md
@@ -17,14 +17,14 @@ gleam add gleam_json
```rust
import myapp.{Cat}
-import gleam/json.{object, string, mapped_array, int, null}
+import gleam/json.{object, string, array, int, null}
pub fn cat_to_json(cat: Cat) -> String {
object([
#("name", string(cat.name)),
#("lives", int(cat.lives),
#("flaws", null()),
- #("nicknames", mapped_array(cat.nicknames, of: string)),
+ #("nicknames", array(cat.nicknames, of: string)),
])
|> json.to_string
}