#JSON Parsing Tutorial

1 messages · Page 1 of 1 (latest)

west oriole
#

Hiya! I've written an app which serializes records to and from JSON in local storage.

I've made it work and this must be something people do all the time but I just haven't been able to make the encoder/decoder stuff "click" for me, for some reason. I think it's to do with coming from Ruby and Elixir and the Type system still being my weak point.

Can anyone suggest a tutorial or something which really deeply explains, step by step, what's going on, how it all works and how to use it properly?

winter bridge
#

This video explains them well: https://www.youtube.com/watch?v=JPGiHrtWJCg

Check out Rover so you can ship fast... and break nothing: https://getrover.com

As a statically-typed language, writing Gleam involves a bit of extra work when you're dealing with dynamic data. You need to check the shape of said data, and you do that with decoders! Let's take a look at how.

Resources:
dynamic/decode: https://hexdocs.pm/gleam_...

▶ Play video