From 8314247efb0ad993f47a0a1225fe49eb925d3a9c Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Wed, 17 Jan 2024 18:02:26 +0000 Subject: [PATCH] Fix documentation of .:!= I think this bit belongs in `.:?=`, by analogy with `.:!` and `.:?`. --- src/Data/Aeson/Types/FromJSON.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Aeson/Types/FromJSON.hs b/src/Data/Aeson/Types/FromJSON.hs index 916a89052..3f766e43a 100644 --- a/src/Data/Aeson/Types/FromJSON.hs +++ b/src/Data/Aeson/Types/FromJSON.hs @@ -865,7 +865,7 @@ ifromJSON = iparse parseJSON (.:!) = explicitParseFieldMaybe' parseJSON -- | Retrieve the value associated with the given key of an 'Object'. --- If the key is not present and the 'omittedField' is @'Just' x@ for some @x@, +-- If the key is not present or the field is @null@ and the 'omittedField' is @'Just' x@ for some @x@, -- the result will be that @x@. -- -- @since 2.2.0.0 @@ -873,7 +873,7 @@ ifromJSON = iparse parseJSON (.:?=) = explicitParseFieldOmit omittedField parseJSON -- | Retrieve the value associated with the given key of an 'Object'. --- If the key is not present or the field is @null@ and the 'omittedField' is @'Just' x@ for some @x@, +-- If the key is not present and the 'omittedField' is @'Just' x@ for some @x@, -- the result will be that @x@. -- -- This differs from '.:?=' by attempting to parse 'Null' the same as any