<?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: JSON.stringify replaces symbol type in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-stringify-replaces-symbol-type/m-p/454366#M42003</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The Graphics class has a toJSON method that you should be using.&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#toJSON" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#toJSON"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#toJSON&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Jan 2019 01:24:12 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2019-01-26T01:24:12Z</dc:date>
    <item>
      <title>JSON.stringify replaces symbol type</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-stringify-replaces-symbol-type/m-p/454365#M42002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m using Esri JavaScript 4.10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a javascript object with graphics.&amp;nbsp; When I use JSON.stringify the output is weird.&amp;nbsp; On all graphics the symbol ‘type’ is changed; ‘simple-marker’ to ‘esriSMS’, ‘simple-fill’ to ‘esriSFS’, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use JSON.parse, those values are not returned to the original.&amp;nbsp; This is causing errors when I try to import it back into the map because ‘new Graphic’ is looking for ‘simple-marker’ while ‘esriSMS’ throws an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know why JSON.stringify replaces those values?&amp;nbsp; Or does anyone have a better way of stringify-ing an object?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2019 01:00:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-stringify-replaces-symbol-type/m-p/454365#M42002</guid>
      <dc:creator>DanielWebb</dc:creator>
      <dc:date>2019-01-26T01:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: JSON.stringify replaces symbol type</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-stringify-replaces-symbol-type/m-p/454366#M42003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The Graphics class has a toJSON method that you should be using.&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#toJSON" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#toJSON"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#toJSON&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2019 01:24:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-stringify-replaces-symbol-type/m-p/454366#M42003</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-01-26T01:24:12Z</dc:date>
    </item>
  </channel>
</rss>

