Skip to content

Commit

Permalink
fix: Value should be encoded as json not jsonb
Browse files Browse the repository at this point in the history
Resolves #344
  • Loading branch information
TeofilC committed Oct 18, 2024
1 parent c482564 commit 35e3023
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog.d/20241018_113208_teofilcamarasu_jsonb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- `Value` should be encoded as `json` not `jsonb`. Resolves #344
6 changes: 3 additions & 3 deletions src/Rel8/Type.hs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ instance DBType UUID where
}


-- | Corresponds to @jsonb@
-- | Corresponds to @json@
instance DBType Value where
typeInformation = TypeInformation
{ encode =
Expand All @@ -426,11 +426,11 @@ instance DBType Value where
Lazy.unpack . Lazy.decodeUtf8 . Aeson.encode
, decode =
Decoder
{ binary = Hasql.jsonb
{ binary = Hasql.json
, parser = parse Aeson.value
, delimiter = ','
}
, typeName = "jsonb"
, typeName = "json"
}


Expand Down

0 comments on commit 35e3023

Please sign in to comment.