<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Synthetic ResponseBody too large for JSON parsing in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Synthetic-ResponseBody-too-large-for-JSON-parsing/m-p/275803#M1399</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;I've not tested the workflow app yet.&lt;/P&gt;&lt;P&gt;I'll try the support ticket approach first and will keep the workflow app as a potential workaround for now.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Apr 2025 01:47:17 GMT</pubDate>
    <dc:creator>droogendijk-phl</dc:creator>
    <dc:date>2025-04-24T01:47:17Z</dc:date>
    <item>
      <title>Synthetic ResponseBody too large for JSON parsing</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Synthetic-ResponseBody-too-large-for-JSON-parsing/m-p/275341#M1386</link>
      <description>&lt;P&gt;In the new HTTP Monitor we're trying to build, we want to monitor an HTTP GET that returns a large json body.&lt;/P&gt;&lt;P&gt;The Execution details show:&lt;/P&gt;&lt;P&gt;"responseSizeInBytes": 62354,&lt;BR /&gt;"responseBodySizeLimitExceeded": false,&lt;/P&gt;&lt;P&gt;In the "responseBody" value we can see that the JSON is not fully shown cq. being cut off.&lt;/P&gt;&lt;P&gt;Our current code in the post-execution script:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var responseBody = response.getResponseBody();

if (!responseBody) {
    api.fail("Response body is empty!");
}

try {
    // 2. Try parsing the JSON
    var obj = JSON.parse(responseBody);
    api.info("Successfully parsed JSON.");
} catch (e) {
    api.fail("Failed to parse JSON: " + e.message);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error we are getting: Failed to parse JSON: Unterminated array literal"&lt;/P&gt;&lt;P class=""&gt;My guess is that this is because the getResponseBody method is limiting to 50 KB as per the &lt;A href="https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/http-monitors-classic/pre-and-post-scripting-for-http-monitors-classic#methods" target="_self"&gt;documentation&lt;/A&gt;:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;response.getResponseBody()—Returns the first 50 KB of the response body as a string. To parse the JSON-formatted response into an object, use, for example:&lt;/LI-CODE&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Is there a way to successfully JSON parse a responseBody larger than 50 KB?&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Apr 2025 01:01:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Synthetic-ResponseBody-too-large-for-JSON-parsing/m-p/275341#M1386</guid>
      <dc:creator>droogendijk-phl</dc:creator>
      <dc:date>2025-04-17T01:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic ResponseBody too large for JSON parsing</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Synthetic-ResponseBody-too-large-for-JSON-parsing/m-p/275366#M1387</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am not aware about an option to increase the limit from your side, you can open a support ticket asking to increase it, it is not an hardcoded limit.&lt;BR /&gt;&lt;BR /&gt;Meanwhile have you tried the &lt;A href="https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/default-workflow-actions/http-request-workflow-action" target="_blank"&gt;http request action&lt;/A&gt; in the workflow app?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 07:52:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Synthetic-ResponseBody-too-large-for-JSON-parsing/m-p/275366#M1387</guid>
      <dc:creator>yanezza</dc:creator>
      <dc:date>2025-04-17T07:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Synthetic ResponseBody too large for JSON parsing</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Synthetic-ResponseBody-too-large-for-JSON-parsing/m-p/275803#M1399</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for the reply.&lt;/P&gt;&lt;P&gt;I've not tested the workflow app yet.&lt;/P&gt;&lt;P&gt;I'll try the support ticket approach first and will keep the workflow app as a potential workaround for now.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 01:47:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/Synthetic-ResponseBody-too-large-for-JSON-parsing/m-p/275803#M1399</guid>
      <dc:creator>droogendijk-phl</dc:creator>
      <dc:date>2025-04-24T01:47:17Z</dc:date>
    </item>
  </channel>
</rss>

