glerd_json
Gleam JSON encoders/decoders codegen using Glerd
gleam add --dev glerd glerd_json
1. Generate types info
Use Glerd
2. Make module for JSON generation
my_module.gleam
import glerd_json
import glerd_gen
pub fn main() {
glerd_gen.record_info
|> glerd_json.generate("src", _)
}
3. Gen JSON encoders/decoders
gleam run -m my_module
Further documentation can be found at https://hexdocs.pm/glerd_json.
Development
gleam test # and then commit generated file