I had a very similar problem. My parameter is of type List<Something>
, so I had to do it this way:
String json = objectMapper.writeValueAsString(parameter);
jsonObject.setValue(json);
ps.setObject(i, jsonObject);