Splunk Search

JSON output values wrapped in double quotes, even number/integer values

kylemain
New Member

I have a field called "windows_event_id" which contains integer values that I am adding to a table.
I am certain that the data type is number because I have enforced it using | convert num(windows_event_id),
and the values are right-aligned in the resulting table column (nifty that Splunk does this).

I also added an "if" 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 windows_event_id are wrapped in double quotes.
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.
Some sample output from the export:

... "windows_event_id":"4688" ...

I would like for the export to treat this field as a number, rather than a string in the output.

Is this something that must be changed in a .conf file on the administration side, or can this be fixed within the search itself?
This is specifically the type of output that I want:

... "windows_event_id":4688 ...

Thank you.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...