@@ -884,14 +884,15 @@ instance ( WriteProduct arity a, WriteProduct arity b
884
884
885
885
instance ( ToJSON1 f
886
886
, GToJSON' Value One g
887
+ , GOmitToJSON Value One g
887
888
) => GToJSON' Value One (f :.: g )
888
889
where
889
890
-- If an occurrence of the last type parameter is nested inside two
890
891
-- composed types, it is encoded by using the outermost type's ToJSON1
891
892
-- instance to generically encode the innermost type:
892
893
gToJSON opts targs =
893
894
let gtj = gToJSON opts targs in
894
- liftToJSON (const False ) gtj (listValue gtj) . unComp1
895
+ liftToJSON (gOmitField targs ) gtj (listValue gtj) . unComp1
895
896
{-# INLINE gToJSON #-}
896
897
897
898
--------------------------------------------------------------------------------
@@ -931,14 +932,15 @@ instance ( EncodeProduct arity a
931
932
932
933
instance ( ToJSON1 f
933
934
, GToJSON' Encoding One g
935
+ , GOmitToJSON Encoding One g
934
936
) => GToJSON' Encoding One (f :.: g )
935
937
where
936
938
-- If an occurrence of the last type parameter is nested inside two
937
939
-- composed types, it is encoded by using the outermost type's ToJSON1
938
940
-- instance to generically encode the innermost type:
939
941
gToJSON opts targs =
940
942
let gte = gToJSON opts targs in
941
- liftToEncoding (const False ) gte (listEncoding gte) . unComp1
943
+ liftToEncoding (gOmitField targs ) gte (listEncoding gte) . unComp1
942
944
{-# INLINE gToJSON #-}
943
945
944
946
--------------------------------------------------------------------------------
0 commit comments