diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 } ``` |