import Data.Maybe (fromJust)
jsonEcho :: CGI CGIResult
jsonEcho = do jsonString <- getInput "json"
output $ (stringify . fromJust . parse . fromJust) jsonString
main = runCGI jsonEcho
The JSON.hs file included in this distribution is a slightly modified version of the one listed above which adds support for Ints.