I have a json object in java and I want to save that Object in PostgreSQL database using hibernate.
I checked PostgreSQL it provides json and jsonb datatypes.
But hibernate doesn't provide mapping to these dataTypes and I am stuck, how to go about it.
I looked quite a bit and found "Persist a JSON Object Using Hibernate" or Custom Types in Hibernate and the @Type Annotation
https://www.baeldung.com/hibernate-persist-json-object
https://www.baeldung.com/hibernate-custom-types
but as I am quite new to hibernate I am not sure if these are what I need or hibernate does provide mapping for json data and I just don't know about it.
I hope someone can guide me, as what is the right way to do it? Thanks
