<?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 modify or view json created by PrintTask in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modify-or-view-json-created-by-printtask/m-p/375033#M34818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Our Firewall blocks the POST request from PrintTask.execute if the JSON is over a certain character length.&amp;nbsp; This happens when a user adds too many graphics to a map.&amp;nbsp; Currently the print task just fails.&amp;nbsp; Instead, I'd like to be able to do one of the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;query the length of the Web_Map_as_JSON and not execute the task if it is too long (instead I'll warn the user).&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;, edit the json to strip out the offending graphics layer if it is too big.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a couple of posts that mention the _getPrintDefinition().&amp;nbsp; This returns an object, and I could use it to find how many graphics are in each graphics layer, but I would really prefer converting the entire object to the same Json used by the task.&amp;nbsp; Is that possible?&amp;nbsp; If I could convert it, then I could determine how many characters the Json is, and achieve 1. above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even better would be if I could somehow edit the Json before the print task sends it and achieve 2. above.&amp;nbsp; However, from what I've found, this doesn't seem possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&amp;nbsp; Thanks, S. Roberts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Dec 2015 00:55:01 GMT</pubDate>
    <dc:creator>SebastianRoberts</dc:creator>
    <dc:date>2015-12-17T00:55:01Z</dc:date>
    <item>
      <title>modify or view json created by PrintTask</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modify-or-view-json-created-by-printtask/m-p/375033#M34818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Our Firewall blocks the POST request from PrintTask.execute if the JSON is over a certain character length.&amp;nbsp; This happens when a user adds too many graphics to a map.&amp;nbsp; Currently the print task just fails.&amp;nbsp; Instead, I'd like to be able to do one of the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;query the length of the Web_Map_as_JSON and not execute the task if it is too long (instead I'll warn the user).&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;, edit the json to strip out the offending graphics layer if it is too big.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a couple of posts that mention the _getPrintDefinition().&amp;nbsp; This returns an object, and I could use it to find how many graphics are in each graphics layer, but I would really prefer converting the entire object to the same Json used by the task.&amp;nbsp; Is that possible?&amp;nbsp; If I could convert it, then I could determine how many characters the Json is, and achieve 1. above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even better would be if I could somehow edit the Json before the print task sends it and achieve 2. above.&amp;nbsp; However, from what I've found, this doesn't seem possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&amp;nbsp; Thanks, S. Roberts&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 00:55:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modify-or-view-json-created-by-printtask/m-p/375033#M34818</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2015-12-17T00:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: modify or view json created by PrintTask</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modify-or-view-json-created-by-printtask/m-p/375034#M34819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sebastian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; See if this thread helps (I think it will).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/365721"&gt;Re: setRequestPreCallback on PrintTask&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 15:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modify-or-view-json-created-by-printtask/m-p/375034#M34819</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-12-18T15:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: modify or view json created by PrintTask</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modify-or-view-json-created-by-printtask/m-p/375035#M34820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent!&amp;nbsp; And his sample code in the follow up explanation does exactly what I had hoped to do!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 23:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/modify-or-view-json-created-by-printtask/m-p/375035#M34820</guid>
      <dc:creator>SebastianRoberts</dc:creator>
      <dc:date>2015-12-18T23:40:42Z</dc:date>
    </item>
  </channel>
</rss>

