<?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: convert raw data in the event into json format in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649519#M110401</link>
    <description>&lt;P&gt;Assuming your actually data has correct json (not the truncated version you supplied), if the report_json field has not already been extracted, then you can use this to extract it and use spath to parse the json string.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "report_json=\"(?&amp;lt;report_json&amp;gt;.*)"
| spath input=report_json&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 06 Jul 2023 15:36:43 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-07-06T15:36:43Z</dc:date>
    <item>
      <title>convert raw data in the event into json format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649476#M110395</link>
      <description>&lt;P&gt;Hai All,&lt;/P&gt;&lt;P&gt;we have some data coming from splunk DB connect and one field has RAW data as below&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to convert the&amp;nbsp; json payload data into readable format as i have attached pic how it should convert and below is the json data&amp;nbsp;&lt;/P&gt;&lt;P&gt;The field we want to perform json operations on is report_json&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;tried with below search but not working and is anything we need to update in the DB query end to get the output&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;index="test1"&amp;nbsp;&lt;BR /&gt;| search NOT errors="*warning Puppet*" NOT errors="*Permission*" report_json=*&lt;BR /&gt;| eval json_string=json(report_json), test=report_json&lt;BR /&gt;| table json_string, test, len(test)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 12:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649476#M110395</guid>
      <dc:creator>sekhar463</dc:creator>
      <dc:date>2023-10-19T12:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: convert raw data in the event into json format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649502#M110398</link>
      <description>&lt;P&gt;Please explain what you mean by "not working".&amp;nbsp; What results do you expect and what results do you get?&lt;/P&gt;&lt;P&gt;The sample event does not contain valid JSON in the result_json field.&amp;nbsp; Specifically, it's missing a closing brace and bracket.&amp;nbsp; Splunk's JSON functions don't handle invalid JSON.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 14:31:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649502#M110398</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-07-06T14:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: convert raw data in the event into json format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649519#M110401</link>
      <description>&lt;P&gt;Assuming your actually data has correct json (not the truncated version you supplied), if the report_json field has not already been extracted, then you can use this to extract it and use spath to parse the json string.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "report_json=\"(?&amp;lt;report_json&amp;gt;.*)"
| spath input=report_json&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 06 Jul 2023 15:36:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649519#M110401</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-07-06T15:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: convert raw data in the event into json format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649622#M110421</link>
      <description>&lt;P&gt;we are getting this data using DB connect from postgre db using below query and has 2 fields&amp;nbsp; report_json AND I have modified the query to to convert json object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 12:43:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/convert-raw-data-in-the-event-into-json-format/m-p/649622#M110421</guid>
      <dc:creator>sekhar463</dc:creator>
      <dc:date>2023-10-19T12:43:58Z</dc:date>
    </item>
  </channel>
</rss>

