<?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: arcpy.FeatureSet - Missing (truncated) JSON result in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634794#M49442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ghali, I had opened a ticket with Esri, but if I recall right... we were using the pre-release version of the software.&amp;nbsp; The ticket was closed until I could confirm if we had the same issue with the final release, but I had given up and worked out an alternate solution for our issue at hand.&amp;nbsp; Unfortunately I ended up building my own object to implement some of the same functionality that I needed from the FeatureSet.&amp;nbsp; I had always intended to get back to this, but ran out of time and the object I built meet the needs for the project I was on at the time.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2015 16:54:15 GMT</pubDate>
    <dc:creator>PF1</dc:creator>
    <dc:date>2015-06-08T16:54:15Z</dc:date>
    <item>
      <title>arcpy.FeatureSet - Missing (truncated) JSON result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634791#M49439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am having a problem using the arcpy.FeatureSet() method to load a polyline to a JSON structure (python Dictionary).&amp;nbsp; It seems that if features were constructed using 'freehand' that the arcpy.FeatureSet().JSON that the 'paths' key returns a truncated, incomplete list.&amp;nbsp; Any support is greatly appreciated.&amp;nbsp; Details below: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Testing from an ArcGIS Desktop 10.1 SP1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 1 - Works: &lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Basic Steps: &lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Start Editing&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Open &lt;STRONG&gt;'Create Features'&lt;/STRONG&gt; frame&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Choose 'Line' under &lt;STRONG&gt;'Construction Tools'&lt;/STRONG&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Draw a simple line with few verticies&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Select the Line&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;view the JSON from arcpy.FeatureSet(input).JSON&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;JSON looks complete&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;PRE class="plain" name="code"&gt;
&amp;gt;&amp;gt;&amp;gt; import json
&amp;gt;&amp;gt;&amp;gt; arcpy.FeatureSet('complexfeatures').JSON
u'{"displayFieldName":"","fieldAliases":{"OBJECTID":"OBJECTID","ASSET_NUM":"ASSET_NUM","PROVIDER":"PROVIDER","CREATED_USER":"CREATED_USER","CREATED_DATE":"CREATED_DATE","LAST_EDITED_USER":"LAST_EDITED_USER","LAST_EDITED_DATE":"LAST_EDITED_DATE","Shape_Length":"Shape_Length"},"geometryType":"esriGeometryPolyline","spatialReference":{"wkid":4269,"latestWkid":4269},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"ASSET_NUM","type":"esriFieldTypeString","alias":"ASSET_NUM","length":12},{"name":"PROVIDER","type":"esriFieldTypeString","alias":"PROVIDER","length":50},{"name":"CREATED_USER","type":"esriFieldTypeString","alias":"CREATED_USER","length":255},{"name":"CREATED_DATE","type":"esriFieldTypeDate","alias":"CREATED_DATE","length":8},{"name":"LAST_EDITED_USER","type":"esriFieldTypeString","alias":"LAST_EDITED_USER","length":255},{"name":"LAST_EDITED_DATE","type":"esriFieldTypeDate","alias":"LAST_EDITED_DATE","length":8},{"name":"Shape_Length","type":"esriFieldTypeDouble","alias":"Shape_Length"}],"features":[{"attributes":{"OBJECTID":30,"ASSET_NUM":null,"PROVIDER":null,"CREATED_USER":null,"CREATED_DATE":null,"LAST_EDITED_USER":null,"LAST_EDITED_DATE":null,"Shape_Length":0.36837905314970948},"geometry":{"paths":[[[-108.05333952499996,32.113163973000042],[-107.92771386599998,32.035043815000051],[-107.96677394499994,31.967480436000073],[-108.10401205899996,31.92947603500005]]]}}]}'

&amp;gt;&amp;gt;&amp;gt; json.loads(arcpy.FeatureSet('complexfeatures').JSON)
{u'features': [{u'geometry': {u'paths': [[[-108.05333952499996, 32.11316397300004], [-107.92771386599998, 32.03504381500005], [-107.96677394499994, 31.967480436000073], [-108.10401205899996, 31.92947603500005]]]}, u'attributes': {u'Shape_Length': 0.3683790531497095, u'OBJECTID': 30, u'PROVIDER': None, u'ASSET_NUM': None, u'CREATED_USER': None, u'CREATED_DATE': None, u'LAST_EDITED_DATE': None, u'LAST_EDITED_USER': None}}], u'fieldAliases': {u'Shape_Length': u'Shape_Length', u'OBJECTID': u'OBJECTID', u'PROVIDER': u'PROVIDER', u'ASSET_NUM': u'ASSET_NUM', u'CREATED_USER': u'CREATED_USER', u'CREATED_DATE': u'CREATED_DATE', u'LAST_EDITED_DATE': u'LAST_EDITED_DATE', u'LAST_EDITED_USER': u'LAST_EDITED_USER'}, u'fields': [{u'alias': u'OBJECTID', u'type': u'esriFieldTypeOID', u'name': u'OBJECTID'}, {u'alias': u'ASSET_NUM', u'length': 12, u'type': u'esriFieldTypeString', u'name': u'ASSET_NUM'}, {u'alias': u'PROVIDER', u'length': 50, u'type': u'esriFieldTypeString', u'name': u'PROVIDER'}, {u'alias': u'CREATED_USER', u'length': 255, u'type': u'esriFieldTypeString', u'name': u'CREATED_USER'}, {u'alias': u'CREATED_DATE', u'length': 8, u'type': u'esriFieldTypeDate', u'name': u'CREATED_DATE'}, {u'alias': u'LAST_EDITED_USER', u'length': 255, u'type': u'esriFieldTypeString', u'name': u'LAST_EDITED_USER'}, {u'alias': u'LAST_EDITED_DATE', u'length': 8, u'type': u'esriFieldTypeDate', u'name': u'LAST_EDITED_DATE'}, {u'alias': u'Shape_Length', u'type': u'esriFieldTypeDouble', u'name': u'Shape_Length'}], u'displayFieldName': u'', u'spatialReference': {u'wkid': 4269, u'latestWkid': 4269}, u'geometryType': u'esriGeometryPolyline'}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice how the 'paths' key in the JSON struct appears to be correct.&amp;nbsp; Shows 4 simple XY verticies that were hand digitized on the map.&amp;nbsp; I can also use the &lt;/SPAN&gt;&lt;STRONG&gt;json&lt;/STRONG&gt;&lt;SPAN&gt; module to load the string (json.loads) correctly into a pyton dict. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG style="text-decoration: underline;"&gt;Scenario 2 - Fails: &lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Basic Steps: &lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Start Editing&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Open &lt;STRONG&gt;'Create Features'&lt;/STRONG&gt; frame&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Choose 'Freehand' under &lt;STRONG&gt;'Construction Tools'&lt;/STRONG&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Draw a 's' shaped feature&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Select the Line&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;view the JSON from arcpy.FeatureSet(input).JSON&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;JSON is malformed and missing the 'paths' elements...&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import json
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; arcpy.FeatureSet('complexfeatures').JSON
u'{"displayFieldName":"","fieldAliases":{"OBJECTID":"OBJECTID","ASSET_NUM":"ASSET_NUM","PROVIDER":"PROVIDER","CREATED_USER":"CREATED_USER","CREATED_DATE":"CREATED_DATE","LAST_EDITED_USER":"LAST_EDITED_USER","LAST_EDITED_DATE":"LAST_EDITED_DATE","Shape_Length":"Shape_Length"},"geometryType":"esriGeometryPolyline","spatialReference":{"wkid":4269,"latestWkid":4269},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID"},{"name":"ASSET_NUM","type":"esriFieldTypeString","alias":"ASSET_NUM","length":12},{"name":"PROVIDER","type":"esriFieldTypeString","alias":"PROVIDER","length":50},{"name":"CREATED_USER","type":"esriFieldTypeString","alias":"CREATED_USER","length":255},{"name":"CREATED_DATE","type":"esriFieldTypeDate","alias":"CREATED_DATE","length":8},{"name":"LAST_EDITED_USER","type":"esriFieldTypeString","alias":"LAST_EDITED_USER","length":255},{"name":"LAST_EDITED_DATE","type":"esriFieldTypeDate","alias":"LAST_EDITED_DATE","length":8},{"name":"Shape_Length","type":"esriFieldTypeDouble","alias":"Shape_Length"}],"features":[{"attributes":{"OBJECTID":31,"ASSET_NUM":null,"PROVIDER":null,"CREATED_USER":null,"CREATED_DATE":null,"LAST_EDITED_USER":null,"LAST_EDITED_DATE":null,"Shape_Length":0.31265287393441688},"geometry":{"paths":['

&amp;gt;&amp;gt;&amp;gt; json.loads(arcpy.FeatureSet('complexfeatures').JSON)
Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp; File "C:\Python27\ArcGIS10.1\Lib\json\__init__.py", line 326, in loads
&amp;nbsp;&amp;nbsp;&amp;nbsp; return _default_decoder.decode(s)
&amp;nbsp; File "C:\Python27\ArcGIS10.1\Lib\json\decoder.py", line 366, in decode
&amp;nbsp;&amp;nbsp;&amp;nbsp; obj, end = self.raw_decode(s, idx=_w(s, 0).end())
&amp;nbsp; File "C:\Python27\ArcGIS10.1\Lib\json\decoder.py", line 382, in raw_decode
&amp;nbsp;&amp;nbsp;&amp;nbsp; obj, end = self.scan_once(s, idx)
ValueError: Expecting object: line 1 column 1259 (char 1259)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice how the 'paths' value does not contain a valid array? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the same problem if I try to declare the FeatureSet empty and load it using something like: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
fs=arcpy.FeatureSet()
fs.load(in_features)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 16:07:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634791#M49439</guid>
      <dc:creator>PF1</dc:creator>
      <dc:date>2013-05-28T16:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.FeatureSet - Missing (truncated) JSON result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634792#M49440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In addition - I can still describe the feature using a simple SearchCursor: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; sc=arcpy.SearchCursor("complexfeatures")
&amp;gt;&amp;gt;&amp;gt; row=sc.next()
&amp;gt;&amp;gt;&amp;gt; row.SHAPE.JSON
u'{"paths":[[[-107.73663618399996,32.118442362000053],[-107.73884077039791,32.119504690926618],[-107.74105642221301,32.120527416729146],... &lt;STRONG&gt;&amp;lt;Removed for length&amp;gt;&lt;/STRONG&gt; ]]],"spatialReference":{"wkid":4269}}'
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; json.loads(row.SHAPE.JSON)
{u'paths': [[[-107.73663618399996, 32.11844236200005], [-107.73884077039791, 32.11950469092662], [-107.741056422213, 32.120527416729146], [-107.74328313944785, 32.12151053940891], [-107.74552092210487, 32.12245405896694], [-107.74776977018637, 32.1233579754042], [-107.75002968369428, 32.12422228872146], [-107.75230066263127, 32.12504699891979], [-107.75458270699994, 32.125832106000075], [-107.75659821899549, 32.12652689818116], [-107.75890406515417, 32.12736096534411], [-107.7666821019275, 32.13028862152029], [-107.76958348743116, 32.131359269059764], [-107.77228464403181, 32.13231601581619], [-107.77473470999132, 32.13313605229926], [-107.77626089730433, 32.133617955489875], [-107.77772344080708, 32.1340552612864], [-107.77913117752215, 32.13445060766041], [-107.78048977721855, 32.134805580023084], [-107.78180549588528, 32.135121762264916], [-107.78308006205398, 32.135399516422645], [-107.78431635157999, 32.135639467773984], [-107.78551650304402, 32.13584202945609], [-107.78682130311263, 32.13602504846348], [-107.78808506738325, 32.13616175389723], [-107.78930956314306, 32.13625233583096], [-107.79049616390569, 32.13629689444882], [-107.79164633087659, 32.136295469626624], [-107.79276078276014, 32.136248044824185], [-107.79384039381608, 32.13615458225699], [-107.79488587568524, 32.1360150196027], [-107.79589885597944, 32.135829063924575], [-107.79687881627672, 32.135596732116255], [-107.79782624013392, 32.135317909177175], [-107.79874153209693, 32.13499247562364], [-107.79962511107819, 32.13462027716119], [-107.80047723427302, 32.13420119986392],&lt;STRONG&gt;...&amp;lt;Removed for length&amp;gt;&lt;/STRONG&gt;]], u'spatialReference': {u'wkid': 4269}}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:43:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634792#M49440</guid>
      <dc:creator>PF1</dc:creator>
      <dc:date>2021-12-12T16:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.FeatureSet - Missing (truncated) JSON result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634793#M49441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having the same issue. Have you reached any solution or workaround ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 15:30:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634793#M49441</guid>
      <dc:creator>RamiGhali2</dc:creator>
      <dc:date>2015-06-08T15:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.FeatureSet - Missing (truncated) JSON result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634794#M49442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ghali, I had opened a ticket with Esri, but if I recall right... we were using the pre-release version of the software.&amp;nbsp; The ticket was closed until I could confirm if we had the same issue with the final release, but I had given up and worked out an alternate solution for our issue at hand.&amp;nbsp; Unfortunately I ended up building my own object to implement some of the same functionality that I needed from the FeatureSet.&amp;nbsp; I had always intended to get back to this, but ran out of time and the object I built meet the needs for the project I was on at the time.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2015 16:54:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634794#M49442</guid>
      <dc:creator>PF1</dc:creator>
      <dc:date>2015-06-08T16:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.FeatureSet - Missing (truncated) JSON result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634795#M49443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have seen this issue when there are true curves in the data.&amp;nbsp; Try a generalize first.&amp;nbsp; This should remove all the curves and product the proper JSON.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Feb 2016 15:33:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634795#M49443</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2016-02-17T15:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.FeatureSet - Missing (truncated) JSON result</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634796#M49444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For what it is worth, I was also experiencing this issue at ArcGIS Desktop 10.1 SP1.&amp;nbsp; I was having issues with some large property boundaries and some large dissolved features, but not point and smaller line features.&amp;nbsp; This issue is fixed at least at version 10.4.1, so I upgraded and the problem went away without modifying the data at all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 18:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-featureset-missing-truncated-json-result/m-p/634796#M49444</guid>
      <dc:creator>NathanHeick</dc:creator>
      <dc:date>2017-11-22T18:57:05Z</dc:date>
    </item>
  </channel>
</rss>

