Skip to content

Commit 8314247

Browse files
committed
Fix documentation of .:!=
I think this bit belongs in `.:?=`, by analogy with `.:!` and `.:?`.
1 parent d48c826 commit 8314247

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Data/Aeson/Types/FromJSON.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,15 +865,15 @@ ifromJSON = iparse parseJSON
865865
(.:!) = explicitParseFieldMaybe' parseJSON
866866

867867
-- | Retrieve the value associated with the given key of an 'Object'.
868-
-- If the key is not present and the 'omittedField' is @'Just' x@ for some @x@,
868+
-- If the key is not present or the field is @null@ and the 'omittedField' is @'Just' x@ for some @x@,
869869
-- the result will be that @x@.
870870
--
871871
-- @since 2.2.0.0
872872
(.:?=) :: (FromJSON a) => Object -> Key -> Parser a
873873
(.:?=) = explicitParseFieldOmit omittedField parseJSON
874874

875875
-- | Retrieve the value associated with the given key of an 'Object'.
876-
-- If the key is not present or the field is @null@ and the 'omittedField' is @'Just' x@ for some @x@,
876+
-- If the key is not present and the 'omittedField' is @'Just' x@ for some @x@,
877877
-- the result will be that @x@.
878878
--
879879
-- This differs from '.:?=' by attempting to parse 'Null' the same as any

0 commit comments

Comments
 (0)