读书人

JSON: property quot;xxxquot; has no getter

发布时间: 2012-12-19 14:13:14 作者: rapoo

JSON: property "xxx" has no getter method in class "..."
解决:声明bean为public class xxx,必须是public,我用默认类型(class xxx)都不行 解决:声明bean为public class xxx,必须是public,我用默认类型(class xxx)都不行

2,Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.lang.ArrayUtils.toObject([C)[Ljava/lang/Character;
原因:定义属性如下:private char[] options = new char[] { 'a', 'f' };好像不能处理这种类型的

3, private String func1 = "function(i){ return this.options[i]; }";
?? 和
?? private JSONFunction func2 = new JSONFunction(new String[] { "i" },
???? "return this.options[i];");
?? 转换后显示结果差不多:
?? {"func1":function(i){ return this.options[i];,"func2":function(i){ return this.options[i]; }}

读书人网 >JavaScript

热点推荐