class Person{
String name;
String age;
List<String> contactNo;
// getters and setters
}
enter code here
在这个例子中,我想要一个 JSON 格式的响应,但“contactNo”列表应该是可流式传输的,因为在我的情况下数据可能很大。
因此,使其可流式传输可以提供内存高效的响应。
I tried Using StreamingOutput but it worked where whole returning instance is collection, but i want to make part of response streamable.
Please suggest any better approach for this problem.