Revision a3dabca9 src/Ganeti/THH.hs
b/src/Ganeti/THH.hs | ||
---|---|---|
285 | 285 |
parseFn :: Field -- ^ The field definition |
286 | 286 |
-> Q Exp -- ^ The entire object in JSON object format |
287 | 287 |
-> Q Exp -- ^ The resulting function that parses a JSON message |
288 |
parseFn field o = maybe [| JSON.readJSON |] (`appE` o) (fieldRead field) |
|
288 |
parseFn field o |
|
289 |
= maybe [| readJSONWithDesc $(stringE $ fieldName field) False |] |
|
290 |
(`appE` o) (fieldRead field) |
|
289 | 291 |
|
290 | 292 |
-- | Produces the expression that will de-serialise a given |
291 | 293 |
-- field. Since some custom parsing functions might need to use the |
Also available in: Unified diff