valderman / selda

A type-safe, high-level SQL library for Haskell
https://selda.link
MIT License
478 stars 58 forks source link

Add example for selda-json #169

Open seanhess opened 3 years ago

seanhess commented 3 years ago

Hi there, I've used Selda on several projects, and I can't figure out how to use selda-json from the documentation.

I have a data type with a field that is Map Text Int and I'd like to serialize it as a postgres JSONB type. If I was willing to store it as text I could serialize it manually, or create a newtype to do that, but I'd like to use JSONB if possible.

Can you direct me to an example or create one?

tonyalaribe commented 10 months ago

We’re you able to figure this out?

seanhess commented 10 months ago

Hey @tonyalaribe, I don’t remember for sure, but I don’t think I was able to figure it out.