<?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: Parse JSON location data from array in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1806#M14</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Daniel, so once I've connected the event_location json input, do I create another geoevent service that outputs this to a json file?&amp;nbsp; Then I take the json file and enrich the fields in the original service, however it's asking for a join field, which the coordiantes input doesn't retain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Mar 2019 17:50:30 GMT</pubDate>
    <dc:creator>LeoLadefian5</dc:creator>
    <dc:date>2019-03-25T17:50:30Z</dc:date>
    <item>
      <title>Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1803#M11</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to parse some location data from a field that is an array, coordinates.&amp;nbsp; I also need to flatten this out as I need to send it to the SDS.&amp;nbsp; What is the process to flatten a JSON and extract attributes?&amp;nbsp; Geoevent Service creator?&amp;nbsp; My thought was to use some sort of JSON query like event_location.geometry.coordiantes{1} for the X and Y geometry fields, but I don't believe this will work.&amp;nbsp; Here is the data I'm looking at:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="463" src="https://community.esri.com/legacyfs/online/438394_pastedImage_1.png" width="500" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2019 19:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1803#M11</guid>
      <dc:creator>LeoLadefian5</dc:creator>
      <dc:date>2019-02-28T19:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1804#M12</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/195017"&gt;Leo Ladefian&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One common method of flattening out the JSON using GeoEvent is to configure the input to specify the JSON Object that you want to pull the prospective fields from. In this case, I believe you want to pull from &lt;EM&gt;&lt;STRONG&gt;status_changes&lt;/STRONG&gt;&lt;/EM&gt;. If you specify this for the JSON Object in the input, then upon saving and starting the input, GeoEvent will pull data and create a definition from everything under &lt;EM&gt;&lt;STRONG&gt;status_changes&lt;/STRONG&gt;&lt;/EM&gt;. You can then use this definition for other connectors. You can also leverage the &lt;A href="http://enterprise.arcgis.com/en/geoevent/latest/process-event-data/processors.htm#ESRI_SECTION1_E6FDF5ADE0314157A33400C36FD5B034"&gt;Field Mapper &lt;/A&gt;processor to map this definition to another that may include it's own "coordinates" field that you manually create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, extracting the coordinates is what may be a little tricky. Since it is a little more deeply nested in the JSON, we may have to create a separate input connector that polls the JSON, but this time, only specify the &lt;EM&gt;&lt;STRONG&gt;event_location.geometry&lt;/STRONG&gt;&lt;/EM&gt; object (JSON queries &lt;SPAN style="text-decoration: underline;"&gt;do&lt;/SPAN&gt; work in this regard) in the input configuration. This way the definition that gets created will include the "type" and "coordinates" fields. From there, you can output this into a JSON file and then use the &lt;A href="http://enterprise.arcgis.com/en/geoevent/latest/process-event-data/processors.htm#ESRI_SECTION1_EC920D5685004575A46D0C2363D0F3E9"&gt;Field Enricher (File)&lt;/A&gt; processor to enrich the original GeoEvent service from the paragraph above with the two fields from this file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, assuming all goes well, the output can receive the data from &lt;EM&gt;&lt;STRONG&gt;status_changes&lt;/STRONG&gt;&lt;/EM&gt; along with the data from the "coordinates" field and will be able to be viewed on a web map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize that this workflow is a little tedious and sounds a little unorthodox, but this is the only way I can think of to both flatten the JSON and extract the data from the nested field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2019 17:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1804#M12</guid>
      <dc:creator>DanielCota1</dc:creator>
      <dc:date>2019-03-13T17:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1805#M13</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Leo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty new to GeoEvent server, but I think you would need to create a new input connector that parses the JSON structure according to what&amp;nbsp; you describe.&amp;nbsp; We are setting up a new 10.7 Pre Release GeoEvent server and the GTFS connector is not working for some reason.&amp;nbsp; To get around it I created the Python script below.&amp;nbsp; This runs through Task Scheduler and polls the JSON web service every 5 minutes or so, and then parses the bus locations out to individual streams (the source just has everything in one JSON object). The resulting individual stream is pushed through a TCP port that GeoEvent server picks up through a TCP input connector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main point is that the code (Python in this case) is parsing the JSON object for specific values.&amp;nbsp; First, the JSON feed is dumped into a list (output = json.loads(data)) and then each individual 'entity' is selected for individual variables (i.e. bus["vehicle"]["trip"]["trip_id])).&amp;nbsp; I think this is what you mean by "flattening out" the JSON data.&amp;nbsp; In your case you could cycle through the status changes (not sure if there is more than one) using '&lt;SPAN&gt;&amp;nbsp;for&amp;nbsp;status in output['status_changes']:' and get a coordinate using status["event_location"]["geometry"]["coordinates"][0].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To set this up through an input connector itself would mean coding it in Java, something I've still got to figure out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck, Jeff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import urllib, json, os&lt;BR /&gt;import time&lt;BR /&gt;import socket&lt;BR /&gt;from datetime import datetime, timedelta&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;def GetBusLocations():&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ## Create socket connection to hostname/port on which a TCP GeoEvent input is running&lt;BR /&gt;&amp;nbsp; &amp;nbsp; host = {Your service IP}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; port = 5563&lt;BR /&gt;&amp;nbsp; &amp;nbsp; tcpSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; tcpSocket.connect((host, port))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; JsonWebData = "https://transitdata...?format=json"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; from urllib import urlopen&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; src = None&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while True:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; src = urlopen(JsonWebData)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data = src.read()&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output = json.loads(data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## Loop through feed entities&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for bus in output['entity']:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tripId = str(bus["vehicle"]["trip"]["trip_id"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; busId = str(bus["vehicle"]["vehicle"]["id"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routeId = str(bus["vehicle"]["trip"]["route_id"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startDate = str(bus["vehicle"]["trip"]["start_date"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startTime = str(bus["vehicle"]["trip"]["start_time"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; timeStamp = str(bus["vehicle"]["timestamp"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; latitude = str(bus["vehicle"]["position"]["latitude"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; longitude = str(bus["vehicle"]["position"]["longitude"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bearing = str(bus["vehicle"]["position"]["bearing"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; speed = str(bus["vehicle"]["position"]["speed"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status = str(bus["vehicle"]["current_status"])&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stopId = str(bus["vehicle"]["stop_id"])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## Subtract 7 hours from timestamp to equate to local time.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dTS = (datetime.utcfromtimestamp(float(timeStamp)) - timedelta(hours=7)).strftime('%Y-%m-%d %H:%M:%S')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## For TESTING&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Bus ID: %s" % busId)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Route: %s" % routeId)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("TripID: %s" % tripId)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Date: %s" % startDate)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Timestamp: %s" % timeStamp)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Lat: %s" % latitude)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Long: %s" % longitude&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Bearing: %s" % bearing)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Speed: %s" % speed)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Status: %s" % status)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## print("Stop: %s" % stopId)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if busId is not None and startDate is not None and startTime is not None:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## Build fields to send to GeoEvent.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; msg = tripId + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; busId + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routeId + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; startDate + " " + startTime + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dTS + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; latitude + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; longitude + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bearing + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; speed + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status + "," + \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stopId + "\n"&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## For TESTING&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #print(msg)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ## Send message to TCP socket&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tcpSocket.send(msg)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; time.sleep(5)&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; time.sleep(30)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pass&lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; finally:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if src:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; src.close()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if __name__ == "__main__":&lt;BR /&gt;&amp;nbsp; &amp;nbsp; GetBusLocations()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2019 16:09:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1805#M13</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2019-03-14T16:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1806#M14</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Daniel, so once I've connected the event_location json input, do I create another geoevent service that outputs this to a json file?&amp;nbsp; Then I take the json file and enrich the fields in the original service, however it's asking for a join field, which the coordiantes input doesn't retain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 17:50:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1806#M14</guid>
      <dc:creator>LeoLadefian5</dc:creator>
      <dc:date>2019-03-25T17:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1807#M15</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In GeoEvent, when you create your input, indicate the X and Y fields as the image. In the services, flatten the input with a mapper including the fields you want. Map&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/440652_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/440653_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;I have not figured out how to work with the trips endpoint though.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:11:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1807#M15</guid>
      <dc:creator>MarielaDel_Rio</dc:creator>
      <dc:date>2019-03-28T13:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1808#M16</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bingo, thats what I ended up doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 13:57:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1808#M16</guid>
      <dc:creator>LeoLadefian5</dc:creator>
      <dc:date>2019-03-28T13:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1809#M17</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you know how to use the /trips end point? I would like to get the trips as features to make reports of those who exit a geoFence and for how long, but I have not figured out how to field map or save the group of coordinates for the routes. One route may have many points in a json array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 14:04:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1809#M17</guid>
      <dc:creator>MarielaDel_Rio</dc:creator>
      <dc:date>2019-03-28T14:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1810#M18</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the route "feature collection" is considered a geojson, so I would use the geojson input for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 14:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1810#M18</guid>
      <dc:creator>LeoLadefian5</dc:creator>
      <dc:date>2019-03-28T14:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Parse JSON location data from array</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1811#M19</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried using geoJson but it does not bring any events. With the Json input, at least I can get the events into a json file, but I get nothing with a geoJson.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 20:09:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parse-json-location-data-from-array/m-p/1811#M19</guid>
      <dc:creator>MarielaDel_Rio</dc:creator>
      <dc:date>2019-04-11T20:09:49Z</dc:date>
    </item>
  </channel>
</rss>

