26 lines
621 B
Markdown
Raw Permalink Normal View History

# 38-haskell-generic-json
This example shows intermediate Haskell JSON work with generic deriving.
It includes:
- a release manifest with `Generic`-derived JSON instances,
- a sum type for rollout strategy encoded through Aeson generic options,
- a CLI that encodes a manifest and decodes it back, and
- a test suite run by `nix flake check`.
Useful commands:
```bash
nix develop
cabal run
cabal run -- api production 3 platform,security stable
cabal test
nix build
./result/bin/mini-generic-json api production 3 platform,security stable
nix run . -- api production 3 platform,security stable
nix flake check
```