I am using the below approach to directly insert json through spring jdbc 
templates.

PGobject jsonObject = new PGobject();
jsonObject.setType("json");
jsonObject.setValue(new Gson().toJson(attributes));
String sql = "INSERT INTO table (id, details) values (?, ?)";
new JdbcTemplate(dataSource).update(sql, "id", jsonObject);


Thanks,
John

On Monday, March 10, 2014 12:41:38 PM UTC+5:30, John wrote:
>
> Hi, 
> I just started using JOOQ in one of the project, i am not able to find out 
> a way to insert a row which has a column of postgresql's json data type. 
> Any help on this regard? 
>
> Thanks,
> John
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to