由于长度尺寸为323940,因此无法解释其休息的响应。请教育

发布于 2025-02-01 14:06:02 字数 320 浏览 3 评论 0原文

无法将响应作为字符串缓解,因为字符串长度为323940,请使用REST放置的Java

以下是使用的代码逻辑:

System.out.println(responses.getBytes().length);

当我使用以下逻辑控制台输出时,将显示为空白屏幕

 // System.out.println(responses.toString());

,我需要在此处使用的正确逻辑是什么这样我将显示我的json到字符串长度323940。请教育。

谢谢问候,塞勒什·普雷文

Cannot relieve the response as string as the string length is 323940 using rest assured java

Below are the code logic used:

System.out.println(responses.getBytes().length);

When I used the below logic console output will be display as blank screen

 // System.out.println(responses.toString());

Now, what is the right logic do I need to use here so that my Json to string length 323940 will be display. Please educate.

Thanks & Regards, Sailesh Praveen

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

妞丶爷亲个 2025-02-08 14:06:02

转换响应键入字符串

String res = response.asString();

以在控制台中以漂亮的JSON格式查看响应

response.prettyPrint();

To convert Response type to String

String res = response.asString();

To view response in pretty json format in console

response.prettyPrint();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文