I'm using Struts 2 along with the json plugin, the properties mappings in the struts.xml file are typically frustrating but I am able to figure them out.
I have come across a case where I cannot set the includeProperties to give me the result I expect.
Frequently I use a configuration expression
^itemList\[\d+\]\.id,
^itemList\[\d+\]\.name
....
This works well.
In this case I would like to return data from a Map not a list (or a map that's a child of a list member)
If a * is used the whole map is printed out correctly, but I do not want all the data from the map elements.
^itemList\[\d+\]\map\.*
The whole map is returnd
I have tried several different formats and none of them have produced results.
^itemList\[\d+\]\map\[\d+\]\.id
^itemList\[\d+\]\map\[\d+\]\.name
Nothing is returned in the map property
Anyone had any luck with a syntax to restrict the contents of a map?
Thanks -Scott
You cannot use 'd' it map as integer.
Try this ^itemList\..*$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With