1

This question has been asked several times around struts community, the scenario is simple :If you specify

<param name="root">
myLists               
</param>    

in json result definition, the includeProperties won't work if I specify some regEx like this one:

 <param name="includeProperties">
   .*\.movieId,
    .*\.filmName
  </param>

the regex is proposed in here,plain field name won't work either.

if I remove root definition ,I can get the JSON ok but with additional JSON traversing which is undesiralbe.

So, is there any solution fix this problem? thx.

Lopakhin
  • 269
  • 1
  • 3
  • 16

1 Answers1

3
<param name="includeProperties">
 \[\d+\]\.movieId,
 \[\d+\]\.filmName
</param>

should do the trick.

Raising the log level to DEBUG for org.apache.struts2.json helped me clarifying this one.

mtlx
  • 218
  • 2
  • 8