Revision c96d44df Ganeti/HTools/IAlloc.hs
b/Ganeti/HTools/IAlloc.hs | ||
---|---|---|
97 | 97 |
parseData :: String -- ^ The JSON message as received from Ganeti |
98 | 98 |
-> Result Request -- ^ A (possible valid) request |
99 | 99 |
parseData body = do |
100 |
decoded <- fromJResult $ decodeStrict body
|
|
100 |
decoded <- fromJResult "Parsing input IAllocator message" (decodeStrict body)
|
|
101 | 101 |
let obj = fromJSObject decoded |
102 | 102 |
-- request parser |
103 | 103 |
request <- liftM fromJSObject (fromObj "request" obj) |
Also available in: Unified diff