minion-0.1.0.0: A Haskell introspectable web router
Safe HaskellSafe-Inferred
LanguageHaskell2010

Web.Minion.Json

Synopsis

Documentation

handleJson Source #

Arguments

:: forall o m ts i st. HandleArgs ts st m 
=> ToJSON o 
=> MonadIO m 
=> Introspection i Response (RespBody '[Json] o) 
=> Method

.

-> (DelayedArgs st ~> m o) 
-> Router' i ts m 

reqJson Source #

Arguments

:: forall r m i ts. Introspection i Request (ReqBody '[Json] r) 
=> FromJSON r 
=> (MonadIO m, MonadThrow m) 
=> ValueCombinator i (WithReq m (ReqBody '[Json] r)) ts m

.

Extracts JSON from request

... /> reqJson @MyType .> ...

data Json Source #

Instances

Instances details
ContentType Json Source # 
Instance details

Defined in Web.Minion.Media.Json

FromJSON a => Decode Json a Source # 
Instance details

Defined in Web.Minion.Media.Json

ToJSON a => Encode Json a Source # 
Instance details

Defined in Web.Minion.Media.Json

Methods

encode :: a -> Response Source #