yesodweb / yesodweb.com-content

Content for the www.yesodweb.com site
http://www.yesodweb.com/
Other
67 stars 112 forks source link

Update restful-content.asciidoc #221

Closed waddlaw closed 6 years ago

waddlaw commented 6 years ago

provideJson is defined as below;

-- | Provide a JSON representation for usage with 'selectReps', using aeson\'s
-- 'J.toJSON' (aeson >= 0.11: 'J.toEncoding') function to perform the conversion.
--
-- @since 1.2.1
provideJson :: (Monad m, J.ToJSON a) => a -> Writer (Endo [ProvidedRep m]) ()
provideJson = provideRep . return . J.toEncoding

https://www.stackage.org/haddock/lts-12.10/yesod-core-1.6.6/src/Yesod.Core.Json.html#provideJson