How to convert java class to json format structure without creating object
问题 I need to document multiple microservices api call,so I have a question that how to create json string out of java pojo class directly. I mean say for example , MyPojo.java public class MyPojo { String name; List<String> address; public MyPojo() { // TODO Auto-generated constructor stub } //setters and getters } now I need the string json structure of the pojo without creating object of the class.May be same the way swagger api creates json structure of @RequestBody object in web UI.