Parsing a JSON post
问题 I have the following piece of code: data Friend = Friend { friend_name :: Text , friend_inTwitter :: Bool , friend_twitterName :: Maybe Text } $(deriveJSON (drop 6) ''Friend) This piece of JSON is being posted to a handler, and I'm having a difficult time getting it. I've tried different things, but let me just put one of them here to generate suggestions: postTestR :: Handler RepPlain postTestR = do value <- parseJsonBody_ return $ RepPlain $ friend_name value That doesn't work, and I can