esqueleto
esqueleto copied to clipboard
use `decodeUtf8'` in JSONB's PersistField instance
first (badParse $ TE.decodeUtf8 bs) $ eitherDecodeStrict bs
could probably be
import Data.Either (fromRight)
...
first (badParse (fromRight "<Invalid UTF-8>" $ TE.decodeUtf8' bs)) $ eitherDecodeStrict bs