Skip to content

Commit

Permalink
Update persistent/Database/Persist/Class/PersistEntity.hs
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Parsons <[email protected]>
  • Loading branch information
matthewbauer and parsonsmatt authored Jul 13, 2024
1 parent 078d80a commit cb292f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion persistent/Database/Persist/Class/PersistEntity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ idField = "_id"
-- toPersistValue = toPersistValueJSON
-- @
toPersistValueJSON :: ToJSON a => a -> PersistValue
toPersistValueJSON = PersistByteString . B.toStrict . encodingToLazyByteString . toEncoding
toPersistValueJSON = PersistText . LT.toStrict . encodeToLazyText

-- | Convenience function for getting a free 'PersistField' instance
-- from a type with JSON instances. The JSON parser used will accept JSON
Expand Down

0 comments on commit cb292f1

Please sign in to comment.