An open API service indexing awesome lists of open source software.

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

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
```