<?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: Invalid JSON specified for feature collection in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/invalid-json-specified-for-feature-collection/m-p/1500987#M60010</link>
    <description>&lt;P&gt;Self-solved, the problem was the "edits" key needs to be encoded as a json string, not a json dict. The documentation does indeed state this but the example provided could be a bit clearer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;before:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;url_params = {
  "edits": {
    "type": "FeatureCollection",
    "features": [...],
  },
}&lt;/LI-CODE&gt;&lt;P&gt;after:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;url_params = {
  "edits": json.dumps({
    "type": "FeatureCollection",
    "features": [...],
  }),
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2024 14:19:35 GMT</pubDate>
    <dc:creator>AaronFrantisak</dc:creator>
    <dc:date>2024-07-03T14:19:35Z</dc:date>
    <item>
      <title>Invalid JSON specified for feature collection</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/invalid-json-specified-for-feature-collection/m-p/1500581#M59987</link>
      <description>&lt;P&gt;I'm attempting to upsert using the &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/append-feature-service-layer/" target="_blank" rel="noopener"&gt;append feature service layer REST API&lt;/A&gt;&amp;nbsp; but the operation is failing. This is the response from the job query below. Is there any way I can get more diagnostics on which field is incorrect? I've checked all the boolean fields and they seem to be correct. I've triple checked all the other fields as well.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Invalid JSON specified for feature collection. Parse failed - Newtonsoft.Json.JsonReaderException: Error parsing boolean value. Path '', line 1, feature_service_layer.py:63&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;position 1.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;at Newtonsoft.Json.JsonTextReader.ParseTrue()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;at Newtonsoft.Json.JsonTextReader.ParseValue()&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;a&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 02 Jul 2024 20:16:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/invalid-json-specified-for-feature-collection/m-p/1500581#M59987</guid>
      <dc:creator>AaronFrantisak</dc:creator>
      <dc:date>2024-07-02T20:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid JSON specified for feature collection</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/invalid-json-specified-for-feature-collection/m-p/1500987#M60010</link>
      <description>&lt;P&gt;Self-solved, the problem was the "edits" key needs to be encoded as a json string, not a json dict. The documentation does indeed state this but the example provided could be a bit clearer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;before:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;url_params = {
  "edits": {
    "type": "FeatureCollection",
    "features": [...],
  },
}&lt;/LI-CODE&gt;&lt;P&gt;after:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;url_params = {
  "edits": json.dumps({
    "type": "FeatureCollection",
    "features": [...],
  }),
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 14:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/invalid-json-specified-for-feature-collection/m-p/1500987#M60010</guid>
      <dc:creator>AaronFrantisak</dc:creator>
      <dc:date>2024-07-03T14:19:35Z</dc:date>
    </item>
  </channel>
</rss>

