Skip to content

Commit

Permalink
Merge pull request #1085 from michaelpj/mpj/fix-doc
Browse files Browse the repository at this point in the history
Fix documentation of .:!=
  • Loading branch information
phadej authored Jan 17, 2024
2 parents d48c826 + 8314247 commit 57bb412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Data/Aeson/Types/FromJSON.hs
Original file line number Diff line number Diff line change
Expand Up @@ -865,15 +865,15 @@ 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
(.:?=) :: (FromJSON a) => Object -> Key -> Parser a
(.:?=) = 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
Expand Down

0 comments on commit 57bb412

Please sign in to comment.