https://github.com/haskell-miso/miso-aeson
Convert Value between aeson and miso
https://github.com/haskell-miso/miso-aeson
aeson haskell json miso
Last synced: 3 months ago
JSON representation
Convert Value between aeson and miso
- Host: GitHub
- URL: https://github.com/haskell-miso/miso-aeson
- Owner: haskell-miso
- License: bsd-3-clause
- Created: 2026-01-05T21:49:40.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2026-04-05T20:58:43.000Z (3 months ago)
- Last Synced: 2026-04-11T04:00:10.716Z (3 months ago)
- Topics: aeson, haskell, json, miso
- Language: Haskell
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
miso-aeson
====================
Library to convert between `Data.Aeson (Value)` and `Miso.JSON (Value)`
```haskell
aesonToJSON :: Aeson.Value -> JSON.Value
jsonToAeson :: JSON.Value -> Aeson.Value
```
### `DerivingVia`
You can derive `To/FromJSON` instances using the `MisoAeson` data type.
```haskell
data D = D
{ a :: Char
, b :: Double
}
deriving stock (Generic)
deriving (Data.Aeson.FromJSON, Data.Aeson.ToJSON) via Generically D
deriving (Miso.JSON.FromJSON, Miso.JSON.ToJSON) via MisoAeson D
```
### Development
Call `nix develop` to enter a shell with [GHC 9.12.2](https://haskell.org/ghc)
```bash
$ nix develop --experimental-features nix-command --extra-experimental-features flakes
```
Once in the shell, you can call `cabal run` to start the development server and view the application at http://localhost:8080
### Build (Web Assembly)
```bash
$ nix develop .#wasm --command bash -c "make"
```
### Build (JavaScript)
```bash
$ nix develop .#ghcjs --command bash -c "make js"
```
### Serve
To host the built application you can call `serve`
```bash
$ nix develop --command bash -c "make serve"
```
### Clean
```bash
$ nix develop --command bash -c "make clean"
```