首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

struts2 过滤JSON集合数据,如何避免Set集合

2012-12-23 
struts2 过滤JSON集合数据,如何处理Set集合如果返回的JSON是个集合,而且集合中包含着集合,怎么配置result

struts2 过滤JSON集合数据,如何处理Set集合
如果返回的JSON是个集合,而且集合中包含着集合,怎么配置result中的includeProperties??

如返回的teachers是一个List<Teacher>,包括着studentSet,studentSet是一个Set<Student>

如果只想取得studentSet中的每一个Student对象的姓名(student.name),includeProperties怎么配置?

我试着如下,不行,什么都不会返回,感觉从逻辑上应该没有错误.
teachers\[\d+\]\.studentSet\[\d+\]\.name

如果是这样,会返回所有的Student对象属性
teachers\[\d+\]\.studentSet.*
这不是我需要的!!!!!!

热点排行