From cdcf2fffcc49e0d5d24708cb54169a96fa356054 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sat, 1 Jan 2022 15:55:36 +0000 Subject: Update docs --- README.md | 4 ++-- 1 file 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 } ``` -- cgit v1.2.3