yesod-json-0.2.3: Generate content for Yesod using the aeson package.




Convert from a JSON value

defaultLayoutJson :: Yesod master => GWidget sub master () -> Value -> GHandler sub master RepHtmlJsonSource

Provide both an HTML and JSON representation for a piece of data, using the default layout for the HTML output (defaultLayout).

jsonToRepJson :: Value -> GHandler sub master RepJsonSource

Wraps the Content generated by jsonToContent in a RepJson.

Convert to a JSON value

parseJsonBody :: GHandler sub master ValueSource

Parse the request body as a JSON value.

Since: 0.2.3

Compatibility wrapper for old API