当我尝试序列化 Expando 时,出现 StackoverflowError(未追溯到我的代码)。用 groovy shell 复制:
... groovy-2.0.6/bin/groovysh new groovy.json.JsonBuilder(new Expando(name:'hello')).toString()
FATAL: java.lang.StackOverflowError
java.lang.StackOverflowError
at java.lang.Exception.<init>(Exception.java:77)
at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:54)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
...
这应该有效吗?