I know that Struts2 JSON Plugin converts whole Action
class into JSON form and by supplying a root
param
we can let it convert only one param
into JSON form.
What if I want out of 5 members of my action class, only 2 or 3 of my members to be converted to JSON? Is this possible?
You can use
includeProperties
orexcludeProperties
.IncludeProperties
didn't worked as expected in my case & hence, I prefer usingexludeProperties
instead.The action configuration will look like