0
예제 문서화 모듈의 JSON은 맵을 객체 배열로 표시합니다. 예를 들어예제 예제 JSON에서지도를 배열로 배열
, 나는이 같은 객체 :
{
"name" : "John Doe",
"attributes" : {
"..." : ...,
}
}
: 나는 예 JSON 모습 기대
{
"name" : "John Doe",
"attributes" : [{
"..." : ...
},{
}]
}
: 같은
이@JsonRootType
@JsonName("MyObj")
@XmlRootElement
public class MyObject {
@DocumentationExample("John Doe")
private String name;
private Map<String, String> attributes;
public MyObject() {}
public String getName() { return name; }
public Map<String, String> getAttributes() { return attributes; }
}
하게 발음에서 예 JSON 보이는
GenerateExampleJsonMethod는 Map을 볼 때 항상 ArrayNode를 생성합니다. 예상되는 JSON을 얻을 수있는 방법이 있습니까?
나는 버전 1.26.2를 사용하고 있습니다.