Because spring security works well with JSP, im going to serialize JSON using JSP.
Then i can wrap <json : property> tags with spring security <sec> tags the same way i wrap table columns.
http://json-taglib.sourceforge.net/
Code:
<%@ taglib prefix="json" uri="http://www.atg.com/taglibs/json" %>
<json:object>
<json:property name="itemCount" value="${cart.itemCount}"/>
<json:property name="subtotal" value="${cart.subtotal}"/>
<json:array name="items" var="item" items="${cart.lineItems}">
<json:object>
<json:property name="title" value="${item.title}"/>
<sec....>
<json:property name="description" value="${item.description}"/>
</sec>
<json:property name="imageUrl" value="${item.imageUrl"/>
<json:property name="price" value="${item.price}"/>
<json:property name="qty" value="${item.qty}"/>
</json:object>
</json:array>
</json:object>