úÎ Ì \(c) Jonathan Kochems 2015BSD-3jonathan.kochems@gmail.com experimentalportable Safe-Inferred<decodes a string encoding a JSON object in a relaxed fashion ÿdecode "{ foo : \"bar\" }" Error "Malformed JSON: expecting string: foo : \"b" decodePermissive "{ foo : \"bar\" }" == Ok $ toJSObject [("foo", JSString $ toJSString "bar")] decodePermissive "{ \"foo\" : \"bar\" }" == Ok $ toJSObject [("foo", JSString $ toJSString "bar")]+returns the list of fields of a JSON Object pdo obj <- decodePermissive "{ foo : \"bar\", fooz : \"baz\" }" return $ get_fields obj == Ok ["foo", "fooz"] do obj <- decodePermissive "{ foo : \"bar\", fooz : \"baz\" }" return $ get_field obj $ head $ get_fields obj == Ok (Just $ JSString $ toJSString "bar" ) json-litobj-0.1.0.0Text.JSON.PermissivedecodePermissive get_fieldsp_objectp_jvaluep_array p_string'leadingWhiteSpace try_wrapper