diff options
author | Louis Pilfold <louis@lpil.uk> | 2022-01-01 15:55:36 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-01-01 15:55:36 +0000 |
commit | cdcf2fffcc49e0d5d24708cb54169a96fa356054 (patch) | |
tree | ac09fa2c81e8802c70e6cd35fc7186fb3ca74b45 | |
parent | b2d421a778fc9d203acae92e3e0590de1d536d44 (diff) | |
download | gleam_json-cdcf2fffcc49e0d5d24708cb54169a96fa356054.tar.gz gleam_json-cdcf2fffcc49e0d5d24708cb54169a96fa356054.zip |
Update docs
-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 } ``` |