Closed nickell closed 5 years ago
I'm having the same issue/question.
Can attest I am having these problems too -- Any solution/workaround found?
Hey @Kyrluckechuck there is no workaround that I'm aware of relevant to this package so I decided to handle it with a couple postgres functions. My use-case is for camelizing json object keys and I've created a gist to share the functions with you here.
So now I can write my queries like this:
select camelize_keys(json_field) from table
or
select camelize_array(json_array_of_objects) from table
I think it makes sense to handle this sort of thing natively inside postgres. Hope that helps!
Hi, I'm using the example provided to do this:
However, when I've grouped documents using
json_agg
it doesn't seem to run those type parsers. This makes sense to me because I'm sure it's formatted as JSON by Postgres before the type parser ever sees it. I'm just curious if there's a recommended approach to parsing data types inside something like this?