@@ -884,14 +884,15 @@ instance ( WriteProduct arity a, WriteProduct arity b
884884
885885instance ( ToJSON1 f
886886 , GToJSON' Value One g
887+ , GOmitToJSON Value One g
887888 ) => GToJSON' Value One (f :.: g )
888889 where
889890 -- If an occurrence of the last type parameter is nested inside two
890891 -- composed types, it is encoded by using the outermost type's ToJSON1
891892 -- instance to generically encode the innermost type:
892893 gToJSON opts targs =
893894 let gtj = gToJSON opts targs in
894- liftToJSON (const False ) gtj (listValue gtj) . unComp1
895+ liftToJSON (gOmitField targs ) gtj (listValue gtj) . unComp1
895896 {-# INLINE gToJSON #-}
896897
897898--------------------------------------------------------------------------------
@@ -931,14 +932,15 @@ instance ( EncodeProduct arity a
931932
932933instance ( ToJSON1 f
933934 , GToJSON' Encoding One g
935+ , GOmitToJSON Encoding One g
934936 ) => GToJSON' Encoding One (f :.: g )
935937 where
936938 -- If an occurrence of the last type parameter is nested inside two
937939 -- composed types, it is encoded by using the outermost type's ToJSON1
938940 -- instance to generically encode the innermost type:
939941 gToJSON opts targs =
940942 let gte = gToJSON opts targs in
941- liftToEncoding (const False ) gte (listEncoding gte) . unComp1
943+ liftToEncoding (gOmitField targs ) gte (listEncoding gte) . unComp1
942944 {-# INLINE gToJSON #-}
943945
944946--------------------------------------------------------------------------------
0 commit comments