When struts2 return "json"
result by default it's configured to serialize the action instance itself. But I think it's not needed for the jqGrid
and it requires only the relevant data. You could use the parameters of the "json"
result to narrow properties required for serialization. First, you should define a property getter by renaming a method which return data for serialization.
@Transactional
public List<Marcacion> getLista() throws Exception {
List<Marcacion> lista = mapper.listado();
return lista;
}
Second, add the "root"
parameter to the result
<result type="json">
<param name="root">lista</param>
</result>
@Transactional
is not related to the JSON data serialization but it requires if you retrieve data from the database.