CouchDB-1.2.3: CouchDB interface

Safe HaskellSafe
LanguageHaskell2010

Database.CouchDB.JSON

Description

Convenient functions for parsing JSON responses. Use these functions to write the readJSON method of the JSON class.

Synopsis

Documentation

jsonField :: JSON a => String -> [(String, JSValue)] -> Result a Source #

Extract a field as a value of type a. If the field does not exist or cannot be parsed as type a, fail.

jsonIsTrue :: String -> [(String, JSValue)] -> Result Bool Source #

True when the field is defined and is true. Otherwise, False.