Closed Ramblurr closed 7 years ago
If you manipulate json with its serialized form in your code, you dont need the lib to do that. Just declare a @Column(columnDefinition = "jsonb")
and hibernate should transfer the string directly and pg will structure it as json.
Perfect, thanks.
I've been using this library with great success, but up until now I've been serializing Java POJOs into JSON and storing those.
However now I want to cache JSON API responses directly in a
jsonb
field in a column.I have the json payload in a
String
variable and I've declared the property type like so:The problem is that my string-containing-json is being serialized as a Json String in the column, rather than a Json Object. This makes querying and such against the json structure not possible.
Is it possible to workaround this with the library?