我试图将来自JSONDoc的注释放在多维对象上,但没有成功。
示例:
@ApiObjectField(description = "Multidimensional array with flags")
private boolean[][] flags;提出以下例外情况:
GRAVE: Servlet.service() for servlet [appservlet] in context with path [/database] threw exception [Request processing failed; nested exception is org.reflections.ReflectionsException: could not get type for name [Z] with root cause org. reflections.ReflectionsException: could not get type for name [Z
at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:378)
at org.jsondoc.core.util.JSONDocUtils.getObjectNameFromAnnotatedClass(JSONDocUtils.java:125)
at org.jsondoc.core.pojo.ApiObjectFieldDoc.getFieldObject(ApiObjectFieldDoc.java:70)
...有人知道如何解决这个问题,或者知道另一个库来生成能够实现这一点的JSON文档?
谢谢。
发布于 2014-06-10 14:12:56
正确的方法是使用类来封装多维对象,比如List<List<Boolean>>。
https://stackoverflow.com/questions/22820274
复制相似问题