<?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 JSONToFeatures Error Parsing in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/jsontofeatures-error-parsing/m-p/1237190#M26613</link>
    <description>&lt;P&gt;I am working on a script that pulls in building footprints from Open Street Maps footprints from the ESRI hosted OSM layer. I am able to make the request fine and get the JSON output. Then I am using&amp;nbsp;arcpy.conversion.JSONToFeatures to output the results to a layer. JSONToFeatures fails with a parsing error when I use the following code below. However once I have the file written I tried running the&amp;nbsp;JSONToFeatures in ArcGIS Pro manually and it works just fine. So then I commented out the write to file section of my code and used the preciously saved text file and it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So why is it when I am writing the file then using JSONToFeatures write after it is not able to parse the file? I have tired closing the file before calling&amp;nbsp;JSONToFeatures to see if that helps but it doesn't.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;osmFootprint = os.path.join(scratch, 'OSMBuildingFootprint')
fp = os.path.join(scratchFolder, 'temp.json')
f = open(fp,"w")           
f.write(json.dumps(osmRequest.json()))            
f.close
arcpy.conversion.JSONToFeatures(fp,osmFootprint, "POLYGON")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2022 13:00:49 GMT</pubDate>
    <dc:creator>BrianLeroux</dc:creator>
    <dc:date>2022-12-02T13:00:49Z</dc:date>
    <item>
      <title>JSONToFeatures Error Parsing</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/jsontofeatures-error-parsing/m-p/1237190#M26613</link>
      <description>&lt;P&gt;I am working on a script that pulls in building footprints from Open Street Maps footprints from the ESRI hosted OSM layer. I am able to make the request fine and get the JSON output. Then I am using&amp;nbsp;arcpy.conversion.JSONToFeatures to output the results to a layer. JSONToFeatures fails with a parsing error when I use the following code below. However once I have the file written I tried running the&amp;nbsp;JSONToFeatures in ArcGIS Pro manually and it works just fine. So then I commented out the write to file section of my code and used the preciously saved text file and it works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So why is it when I am writing the file then using JSONToFeatures write after it is not able to parse the file? I have tired closing the file before calling&amp;nbsp;JSONToFeatures to see if that helps but it doesn't.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;osmFootprint = os.path.join(scratch, 'OSMBuildingFootprint')
fp = os.path.join(scratchFolder, 'temp.json')
f = open(fp,"w")           
f.write(json.dumps(osmRequest.json()))            
f.close
arcpy.conversion.JSONToFeatures(fp,osmFootprint, "POLYGON")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 13:00:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/jsontofeatures-error-parsing/m-p/1237190#M26613</guid>
      <dc:creator>BrianLeroux</dc:creator>
      <dc:date>2022-12-02T13:00:49Z</dc:date>
    </item>
  </channel>
</rss>

