https://github.com/haskell-miso/servant-miso-json
A servant content type for miso JSON
https://github.com/haskell-miso/servant-miso-json
haskell json miso servant
Last synced: 2 months ago
JSON representation
A servant content type for miso JSON
- Host: GitHub
- URL: https://github.com/haskell-miso/servant-miso-json
- Owner: haskell-miso
- License: bsd-3-clause
- Created: 2026-02-12T13:58:34.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2026-02-13T02:07:55.000Z (4 months ago)
- Last Synced: 2026-04-11T04:00:20.267Z (2 months ago)
- Topics: haskell, json, miso, servant
- Language: Haskell
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
servant-miso-json
============================
This package provides a `JSON` content type for use with [servant](https://hackage.haskell.org/packages/servant) APIs. This can be used to render [miso](https://github.com/dmjio/miso) `Value` types as JSON.
### Usage
```haskell
import Servant.Miso.JSON (JSON)
import Miso.String (MisoString)
import Miso.JSON (ToJSON)
data Person
= Person
{ name :: MisoString
, age :: Int
} deriving stock Generic
deriving anyclass ToJSON
type API = "person" :> Capture "name" MisoString :> Get '[JSON] Person
```
## Build
```shell
cabal build
```
```shell
nix develop --command bash -c 'cabal build'
```
# Develop
```shell
nix develop
```