aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2022-01-01 16:28:46 +0000
committerLouis Pilfold <louis@lpil.uk>2022-01-01 16:28:46 +0000
commit09eee2ac5f14d0868233ad2251d6aedb5c187b59 (patch)
tree9c7f3288936ece06a39e430481ece51655f7f87c /README.md
parent1889ac98f4979888568790e7bb0e9714da4e7439 (diff)
downloadgleam_json-09eee2ac5f14d0868233ad2251d6aedb5c187b59.tar.gz
gleam_json-09eee2ac5f14d0868233ad2251d6aedb5c187b59.zip
Hack around GH syntax highlighting
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index eb36512..f557e3c 100644
--- a/README.md
+++ b/README.md
@@ -31,11 +31,6 @@ import gleam/json
import gleam/dynamic
import gleam/result
-pub type MyError {
- InvalidJson(json.DecodeError)
- InvalidFormat(dynamic.DecodeError)
-}
-
pub fn cat_from_json(json: String) -> Result<Cat, MyError> {
try data =
json.decode(encoded)
@@ -51,6 +46,11 @@ pub fn cat_from_json(json: String) -> Result<Cat, MyError> {
Ok(cat)
}
+
+pub type MyError {
+ InvalidJson(json.DecodeError)
+ InvalidFormat(dynamic.DecodeError)
+}
```
## Installation