jsonplugin includeProperties 正则表达式,工作不正常。
2009-09-14 04:11
387 查看
配置 <param name="includeProperties"> /[/d+/]/.[^.]*$, /[/d+/]/.children/[/d+/]/.catName </param> 属性 [0].children[1].catName应该能匹配,结果却没有。
修改JSONResult代码如下:
// Add a pattern that does not have the indexed property matching (ie. list/[/d+/] becomes list). if (patternPiece.endsWith("//]")) { this.includeProperties.add(Pattern.compile(patternExpr.substring(0, patternExpr.lastIndexOf("//[")))); if (log.isDebugEnabled()) log.debug("Adding include property expression: " + patternExpr.substring(0, patternExpr.lastIndexOf("//["))); }[/code]
相关文章推荐
- struts2 jsonplugin includeProperties 对list集合的正则配置
- struts2 jsonplugin includeProperties 对list集合的正则配置
- struts2 jsonplugin includeProperties 对list集合的正则配置
- struts2 配置json格式数据( includeProperties中对list集合的正则配置)
- struts2 配置json格式数据( includeProperties中对list集合的正则配置)
- 正则表达式提取Json数据的方法
- 正则表达式搭配js轻松处理json文本方便而老古
- 正则表达式是如何工作的?
- js使用正则表达式和prototype实现jsonp转json
- 使用正则表达式的格式化与高亮显示json字符串
- 正则表达式工作总结
- jQuery 1.4.2 getJSON() 不能正常工作的原因
- 通过正则表达式替换json 串key中的点"."号
- struts2 配置JSON(includeProperties)
- JSON的使用、利用正则表达式解决不定类型返回Json格式
- js-json的数据转化及正则表达式的运用
- java中提供了对正则表达式的支持。 有的时候,恰当地使用正则,可以让我们的工作事半功倍! 如下代码用来检验一个四则运算式中数据项的数目,请填写划线部分缺少的代码。 注意:只填写缺少代码,不要
- Jquery+Json+struts交互demo,以及为什么要配置includeProperties,root
- 在/usr/include/regex.h文件中正则表达式
- 正则表达式操作json数据通过键(Key)修改值(Value)