<?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 Json created in python is different then the one from GP service in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/json-created-in-python-is-different-then-the-one/m-p/262964#M20277</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all&lt;/P&gt;&lt;P&gt;I have a python script that gets some parameters and return a json.&lt;/P&gt;&lt;P&gt;It uses the json.dumps(Dictionary) command&lt;/P&gt;&lt;P&gt;When I run it from PyScripter I get a great json (see below).&lt;/P&gt;&lt;P&gt;When I run it from ArcMap (as a tool) or from the GpService the json have a few problems:&lt;/P&gt;&lt;P&gt;1) key (3435) is not quoted.&lt;/P&gt;&lt;P&gt;2) Single quote and not double quote&lt;/P&gt;&lt;P&gt;3) All strings have u (u'461') in the beginning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Gp Service:&amp;nbsp;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;{3435: {'KM to': '5.0', 'road_num': u'461', ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;From pyScripter:&amp;nbsp;{"3435": {"KM to": "5.0", "road_num": "461"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;When I put the second string in json beautifier it looks&amp;nbsp;great, the first one does not work at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;Is there any setting for the json.dumps that make it works?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2020 13:06:22 GMT</pubDate>
    <dc:creator>ModyBuchbinder</dc:creator>
    <dc:date>2020-07-14T13:06:22Z</dc:date>
    <item>
      <title>Json created in python is different then the one from GP service</title>
      <link>https://community.esri.com/t5/python-questions/json-created-in-python-is-different-then-the-one/m-p/262964#M20277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all&lt;/P&gt;&lt;P&gt;I have a python script that gets some parameters and return a json.&lt;/P&gt;&lt;P&gt;It uses the json.dumps(Dictionary) command&lt;/P&gt;&lt;P&gt;When I run it from PyScripter I get a great json (see below).&lt;/P&gt;&lt;P&gt;When I run it from ArcMap (as a tool) or from the GpService the json have a few problems:&lt;/P&gt;&lt;P&gt;1) key (3435) is not quoted.&lt;/P&gt;&lt;P&gt;2) Single quote and not double quote&lt;/P&gt;&lt;P&gt;3) All strings have u (u'461') in the beginning&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From Gp Service:&amp;nbsp;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;{3435: {'KM to': '5.0', 'road_num': u'461', ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;From pyScripter:&amp;nbsp;{"3435": {"KM to": "5.0", "road_num": "461"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;When I put the second string in json beautifier it looks&amp;nbsp;great, the first one does not work at all.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;Is there any setting for the json.dumps that make it works?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2020 13:06:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/json-created-in-python-is-different-then-the-one/m-p/262964#M20277</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2020-07-14T13:06:22Z</dc:date>
    </item>
  </channel>
</rss>

