@@ -460,7 +460,13 @@ instance FromField JSON.Value where
460460 else case mbs of
461461 Nothing -> returnError UnexpectedNull f ""
462462 Just bs ->
463+#if MIN_VERSION_aeson(0,6,3)
463464 case JSON.eitherDecodeStrict' bs of
465+#elsif MIN_VERSION_bytestring(0,10,0)
466+ case JSON.eitherDecode' $ LB.fromStrict bs of
467+#else
468+ case JSON.eitherDecode' $ LB.fromChunks [bs] of
469+#endif
464470 Left err -> returnError ConversionFailed f err
465471 Right val -> pure val
466472