aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 108913d..415a654 100644
--- a/README.md
+++ b/README.md
@@ -13,13 +13,13 @@ pub type Cat {
}
pub fn cat_to_json(cat: Cat) -> String {
- let data = object([
+ object([
#("name", string(cat.name)),
#("lives", int(9),
#("flaws", null()),
#("nicknames", list([string("Kitty"), string("Sweetie")])),
])
- json.encode(data)
+ |> json.to_string
}
```