NOTE: This helper is only guaranteed to fully work with the built-in PostgresDialect.
While the produced SQL is compatible with all PostgreSQL databases, some third-party dialects
may not parse the nested JSON into objects. In these cases you can use the built in
ParseJSONResultsPlugin to parse the results.
The PostgreSQL
json_build_objectfunction.NOTE: This helper is only guaranteed to fully work with the built-in
PostgresDialect. While the produced SQL is compatible with all PostgreSQL databases, some third-party dialects may not parse the nested JSON into objects. In these cases you can use the built inParseJSONResultsPluginto parse the results.Examples
The generated SQL (PostgreSQL):