<?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: Parsing json for IOT experimentation in ArcGIS GeoEvent Server Questions</title>
    <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/1371672#M4067</link>
    <description>&lt;P&gt;Sorry for the delay. Yes it's done in Geoevent definition because i need to access to value as string to work with array.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 15:48:58 GMT</pubDate>
    <dc:creator>JPDeboos</dc:creator>
    <dc:date>2024-01-18T15:48:58Z</dc:date>
    <item>
      <title>Parsing json for IOT experimentation</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/397864#M1701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to parse this json with geoevent 10.5.0 (device send temperature, humidity and battery level).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;{&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"measurements"&lt;/SPAN&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; &lt;SPAN style="color: #800000;"&gt;"doubleValue"&lt;/SPAN&gt;: 95.66929133858267,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"type"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"Battery"&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"unit"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"%"&lt;/SPAN&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; &lt;SPAN style="color: #800000;"&gt;"doubleValue"&lt;/SPAN&gt;: 100,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"type"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"Humidity"&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"unit"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"%"&lt;/SPAN&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; &lt;SPAN style="color: #800000;"&gt;"doubleValue"&lt;/SPAN&gt;: 11.375,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"type"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"Temperature"&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"unit"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"�C"&lt;/SPAN&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; &lt;SPAN style="color: #800000;"&gt;"doubleValue"&lt;/SPAN&gt;: 11.375,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"type"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"Temperature_Rosee"&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"unit"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"�C"&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; ],&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"port"&lt;/SPAN&gt;: 3,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"deviceName"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"Azay-Le-Rideau RD 751 - PR 56"&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"deviceReference"&lt;/SPAN&gt;: &lt;SPAN style="color: #0000ff;"&gt;null&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"deviceTypeRef"&lt;/SPAN&gt;: &lt;SPAN style="color: #0000ff;"&gt;null&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"eui"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"70b3d580a01034f1"&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"gatewayEui"&lt;/SPAN&gt;: &lt;SPAN style="color: #0000ff;"&gt;null&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"payloadHex"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"03f3847c893000b668"&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"rssi"&lt;/SPAN&gt;: 0,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"seqn"&lt;/SPAN&gt;: 1587,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"size"&lt;/SPAN&gt;: 0,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"datr"&lt;/SPAN&gt;: &lt;SPAN style="color: #0000ff;"&gt;null&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"freq"&lt;/SPAN&gt;: &lt;SPAN style="color: #0000ff;"&gt;null&lt;/SPAN&gt;,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"snr"&lt;/SPAN&gt;: 0,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"latitude"&lt;/SPAN&gt;: 47.22267150878906,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"longitude"&lt;/SPAN&gt;: 0.49931803345680237,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"spreadFactor"&lt;/SPAN&gt;: 0,&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #800000;"&gt;"timestamp"&lt;/SPAN&gt;: &lt;SPAN style="color: #800000;"&gt;"2018-04-04T13:59:36.871Z"&lt;/SPAN&gt;}

I created an input :
&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/402880_pastedImage_1.png" style="width: 620px; height: 316px;" /&gt;
geoevent definitation created by geoevent :
&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/402971_pastedImage_2.png" style="width: 620px; height: 443px;" /&gt;

i use a field mapper &lt;/PRE&gt;&lt;P&gt;&lt;IMG class="jive-image image-4" src="https://community.esri.com/legacyfs/online/402973_pastedImage_4.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/402972_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;in my output i have this :&lt;/P&gt;&lt;P&gt;CD37synox-rest-json-in,"[{""doubleValue"":18.3125,""type"":""Temperature"",""unit"":""Â°c""},{""doubleValue"":18.3125,""type"":""Temperature_Rosee"",""unit"":""Â°c""},{""doubleValue"":100.0,""type"":""Humidity"",""unit"":""%""},{""doubleValue"":94.48818897637796,""type"":""Battery"",""unit"":""%""}]",3,Tork RD 7060 - PR 70,,,70b3d580a010353f,,03f086718930012567,0,3421,0,,,0,47.122864,0.43538886,0,2018-04-25T11:40:37.954+02:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem is how to seperate all values from measurements array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i try with this &lt;IMG class="image-5 jive-image" src="https://community.esri.com/legacyfs/online/402974_pastedImage_21.png" style="width: auto; height: auto;" /&gt;but i have the same results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i try to put in input JSON Object Name = measurements, but geoevent definition is not ok :&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-6 jive-image" src="https://community.esri.com/legacyfs/online/402975_pastedImage_22.png" style="width: 620px; height: 213px;" /&gt;&lt;/P&gt;&lt;P&gt;i try to split with &lt;A class="link-titled" href="https://github.com/Esri/field-splitter-for-geoevent" title="https://github.com/Esri/field-splitter-for-geoevent" rel="nofollow noopener noreferrer" target="_blank"&gt;GitHub - Esri/field-splitter-for-geoevent: ArcGIS GeoEvent Server Sample Processor for Splitting fields with CSV values …&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but after i have 4 rows in my output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you help me to understand how to recover unique value Battery, Humidity, Temperature, Temperature_Rosee and other fileds in the same record ?&lt;/P&gt;&lt;P&gt;(after i need to create a table to store data and send a notification when temperature is under 3°C)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/397864#M1701</guid>
      <dc:creator>Jean-PierreDEBOOS1</dc:creator>
      <dc:date>2021-12-12T16:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing json for IOT experimentation</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/397865#M1702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We find a solution by using a processor : Field Calculator (Regular Expression).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. we use a unique field in GeoEvent definition otherwise group measurments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="114" src="https://community.esri.com/legacyfs/online/420970_pastedImage_2.png" width="155" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. we create a definition with all field we need :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" height="189" src="https://community.esri.com/legacyfs/online/420971_pastedImage_3.png" width="377" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. In service, we use field mapper to keep part of array in new field :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" height="218" src="https://community.esri.com/legacyfs/online/420972_pastedImage_4.png" width="301" /&gt;&lt;/P&gt;&lt;P&gt;dans les champs comme temperature json we have now : &lt;SPAN style="font-size: 7.0pt;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: red; font-size: 7.0pt;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="font-size: 7.0pt;"&gt;""doubleValue"":21.375,""type"":""&lt;/SPAN&gt;&lt;SPAN style="color: red; font-size: 7.0pt;"&gt;Temperature&lt;/SPAN&gt;&lt;SPAN style="font-size: 7.0pt;"&gt;"",""unit"":""°c"",""date"":null&lt;/SPAN&gt;&lt;SPAN style="color: red; font-size: 7.0pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. with field calculator regular experssion, we keep numeric characters :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-4" height="134" src="https://community.esri.com/legacyfs/online/420973_pastedImage_5.png" width="268" /&gt;&lt;/P&gt;&lt;P&gt;we did it for each values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geoevent is powerfull !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2018 09:10:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/397865#M1702</guid>
      <dc:creator>Jean-PierreDEBOOS1</dc:creator>
      <dc:date>2018-09-03T09:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing json for IOT experimentation</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/397866#M1703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I’m trying to do something similar&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In step 1 you change the type of the field that contains the array of objects to string . Is this done in the geoevent definition that results from the input adapter ?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2019 03:50:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/397866#M1703</guid>
      <dc:creator>VictorChan</dc:creator>
      <dc:date>2019-01-16T03:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parsing json for IOT experimentation</title>
      <link>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/1371672#M4067</link>
      <description>&lt;P&gt;Sorry for the delay. Yes it's done in Geoevent definition because i need to access to value as string to work with array.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 15:48:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-geoevent-server-questions/parsing-json-for-iot-experimentation/m-p/1371672#M4067</guid>
      <dc:creator>JPDeboos</dc:creator>
      <dc:date>2024-01-18T15:48:58Z</dc:date>
    </item>
  </channel>
</rss>

