CouchDB-0.10.1: CouchDB interface

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 aSource

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 BoolSource

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