@@ -447,6 +447,13 @@ instance (Selector s, GFromJSON a) => GFromRecord (S1 s a) where
447447 key = fieldNameModifier opts $ selName (undefined :: t s a p)
448448 {-# INLINE gParseRecord #-}
449449
450+instance (Selector s, FromJSON a) => GFromRecord (S1 s (K1 i (Maybe a))) where
451+ gParseRecord opts obj = (M1 . K1) <$> obj .:? pack key
452+ where
453+ key = fieldNameModifier opts $
454+ selName (undefined :: t s (K1 i (Maybe a)) p)
455+ {-# INLINE gParseRecord #-}
456+
450457--------------------------------------------------------------------------------
451458
452459class ProductSize f where