I noticed that the IHP fill function gives a could not deduce (ParamReader Value)
type error when trying to populate a record field with type JSONB.
The application here is just looking to store the raw JSON payload from n AJAX request. I'm wondering what the best way to handle this would be?
Edit: Actually it looks like the ihp function requestBodyJSON
is all that is required. This unpacks the JSON payload to an Aeson value and that could be stored in the jsonb record field .
requestBodyJSON
is exactly the right thing :)fill
generally works with JSON, but only when decoding to some specific value (e.g.fill @'["projectsCount"]
would work with a request like{"projectsCount":1337}
)