<?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 output values wrapped in double quotes, even number/integer values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/JSON-output-values-wrapped-in-double-quotes-even-number-integer/m-p/447234#M126800</link>
    <description>&lt;P&gt;I have a field called  &lt;CODE&gt;"windows_event_id"&lt;/CODE&gt; which contains integer values that I am adding to a table. &lt;BR /&gt;
I am certain that the data type is &lt;EM&gt;number&lt;/EM&gt; because I have enforced it using  &lt;CODE&gt;| convert num(windows_event_id)&lt;/CODE&gt;, &lt;BR /&gt;
and the values are right-aligned in the resulting table column (nifty that Splunk does this). &lt;/P&gt;

&lt;P&gt;I also added an  &lt;CODE&gt;"if"&lt;/CODE&gt; condition in an eval statement which checks if the values are a number format - and they all are, as expected. However, when I export the resulting table in JSON format the values for  &lt;CODE&gt;windows_event_id&lt;/CODE&gt; are wrapped in double quotes. &lt;BR /&gt;
It seems when exporting in JSON format that ALL fields, regardless of data type, in the table are wrapped in double quotes and therefore treated as strings. &lt;BR /&gt;
Some sample output from the export:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... "windows_event_id":"4688" ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like for the export to treat this field as a number, rather than a string in the output. &lt;/P&gt;

&lt;P&gt;Is this something that must be changed in a .conf file on the administration side, or can this be fixed within the search itself? &lt;BR /&gt;
This is specifically the type of output that I want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... "windows_event_id":4688 ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2019 15:17:57 GMT</pubDate>
    <dc:creator>kylemain</dc:creator>
    <dc:date>2019-06-24T15:17:57Z</dc:date>
    <item>
      <title>JSON output values wrapped in double quotes, even number/integer values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/JSON-output-values-wrapped-in-double-quotes-even-number-integer/m-p/447234#M126800</link>
      <description>&lt;P&gt;I have a field called  &lt;CODE&gt;"windows_event_id"&lt;/CODE&gt; which contains integer values that I am adding to a table. &lt;BR /&gt;
I am certain that the data type is &lt;EM&gt;number&lt;/EM&gt; because I have enforced it using  &lt;CODE&gt;| convert num(windows_event_id)&lt;/CODE&gt;, &lt;BR /&gt;
and the values are right-aligned in the resulting table column (nifty that Splunk does this). &lt;/P&gt;

&lt;P&gt;I also added an  &lt;CODE&gt;"if"&lt;/CODE&gt; condition in an eval statement which checks if the values are a number format - and they all are, as expected. However, when I export the resulting table in JSON format the values for  &lt;CODE&gt;windows_event_id&lt;/CODE&gt; are wrapped in double quotes. &lt;BR /&gt;
It seems when exporting in JSON format that ALL fields, regardless of data type, in the table are wrapped in double quotes and therefore treated as strings. &lt;BR /&gt;
Some sample output from the export:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... "windows_event_id":"4688" ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like for the export to treat this field as a number, rather than a string in the output. &lt;/P&gt;

&lt;P&gt;Is this something that must be changed in a .conf file on the administration side, or can this be fixed within the search itself? &lt;BR /&gt;
This is specifically the type of output that I want:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... "windows_event_id":4688 ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 15:17:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/JSON-output-values-wrapped-in-double-quotes-even-number-integer/m-p/447234#M126800</guid>
      <dc:creator>kylemain</dc:creator>
      <dc:date>2019-06-24T15:17:57Z</dc:date>
    </item>
  </channel>
</rss>

