Skip to content

A servant content type for miso JSON

License

Notifications You must be signed in to change notification settings

haskell-miso/servant-miso-json

Repository files navigation

servant-miso-json

This package provides a JSON content type for use with servant APIs. This can be used to render miso Value types as JSON.

Usage

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

cabal build
nix develop --command bash -c 'cabal build'

Develop

nix develop

About

A servant content type for miso JSON

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published