
Sign up to save your podcasts
Or
Building out some hardcoded users
need to supply User before the data
don’t forget the = sign
We could manually build the encode and decode to/from JSON, but Generics, lets you automatically do things based on the data type
adding {-# LANGUAGE DeriveGeneric #-} and import GHC.Generics
don’t forget to add instance
Now we are able to see the output of having the generic encoder
Building out some hardcoded users
need to supply User before the data
don’t forget the = sign
We could manually build the encode and decode to/from JSON, but Generics, lets you automatically do things based on the data type
adding {-# LANGUAGE DeriveGeneric #-} and import GHC.Generics
don’t forget to add instance
Now we are able to see the output of having the generic encoder