If you mean using the JSR-353 javax.json* classes, I have a solution that works for PostgreSQL and possibly for MySQL, since they're generally supposed to accept it via PreparedStatement.setString/ResultSet.getString. Haven't written-up the instructions yet, because I've got other work, but here it is https://github.com/mopano/hibernate-json-type Generally you just have to use this from the console:
./gradlew clean assemble publishToMavenLocal
Then add the dependency to your project. The coordinates are groupId 'com.mopano', artifactId 'hibernate-json-contributor', version '1.0'. We use a slightly different version of this for our internal project, because we also want jsonb arrays. If you have set-up a PostgreSQL database with the credentials for the main hibernate orm project, you can use `build` instead of `assemble` to run the tests on it. |