<?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: Extracting JSON/XML from string entry and dispalying in table in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412515#M27066</link>
    <description>&lt;P&gt;What do you mean by "request and response fields which are XML or JSON are not displayed properly in the table"?  They will not be pretty-printed, if that's what you mean.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2019 15:29:43 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-03-01T15:29:43Z</dc:date>
    <item>
      <title>Extracting JSON/XML from string entry and dispalying in table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412514#M27065</link>
      <description>&lt;P&gt;I am trying to extract various fields from below entry in splunk.&lt;BR /&gt;
I executed the below splunk query :&lt;BR /&gt;
index=test_index source="testlogs.log" "InteractionId=test_interaction_id1" | search("||url") | table service,operation,status,status_code,exception,duration,url,request, response&lt;BR /&gt;
The below is splunk log entry:&lt;BR /&gt;
2019-02-28 22:21:34.248 [UUID=d791aecb-c320-453a-9207-bf96e01beaaf|InteractionId=test_interaction_id1] INFO  com.test.MyLogger - service="TestService"||operation="testOperation"||url="&lt;A href="http://localhost:8080/testservice/v4/testOperation%22%7C%7Crequest=%22%7B%5C%22customer%5C%22:%7B%5C%22id%5C%22:%5C%2280%5C%22,%5C%22name%5C%22:%5C%22John%5C%22%7D%7D%22%7C%7Crequest_headers=%22%7BContent-Type=application/json,cache-control=no-cache,Accept=application/json%7D%22%7C%7Cresponse=%22%7B%5C%22customerType%5C%22:%5CFIXED%5C%22%7D%22%7C%7Cresponse_headers=%22%7BSet-Cookie=;secure;HttpOnly%7D%22%7C%7Cstatus=%22SUCCESS%22%7C%7Cstatus_code=%22200%22%7C%7Cduration=%2295ms" target="_blank"&gt;http://localhost:8080/testservice/v4/testOperation"||request="{\"customer\":{\"id\":\"80\",\"name\":\"John\"}}"||request_headers="{Content-Type=application/json,cache-control=no-cache,Accept=application/json}"||response="{\"customerType\":\FIXED\"}"||response_headers="{Set-Cookie=;secure;HttpOnly}"||status="SUCCESS"||status_code="200"||duration="95ms&lt;/A&gt;".&lt;BR /&gt;
request and response fields which are XML or JSON are not displayed properly in the table.&lt;BR /&gt;
JSON is dispalyed as {\&lt;/P&gt;

&lt;P&gt;I would like to have the complete JSON and XML in the table.&lt;/P&gt;

&lt;P&gt;Thanks in Advance!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412514#M27065</guid>
      <dc:creator>amith7</dc:creator>
      <dc:date>2020-09-29T23:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON/XML from string entry and dispalying in table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412515#M27066</link>
      <description>&lt;P&gt;What do you mean by "request and response fields which are XML or JSON are not displayed properly in the table"?  They will not be pretty-printed, if that's what you mean.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 15:29:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412515#M27066</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-03-01T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON/XML from string entry and dispalying in table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412516#M27067</link>
      <description>&lt;P&gt;Can you repost using the code tool &lt;CODE&gt;101010&lt;/CODE&gt; ?&lt;BR /&gt;
It looks like some of your content has been stripped from the question (probably because it looked like XML/HTML)&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 15:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412516#M27067</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-01T15:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON/XML from string entry and dispalying in table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412517#M27068</link>
      <description>&lt;P&gt;I am trying to extract various fields from below entry in splunk.&lt;/P&gt;

&lt;P&gt;I executed the below splunk query :&lt;BR /&gt;
index=test_index source="testlogs.log" "InteractionId=test_interaction_id1" | search("||url") | table service,operation,status,status_code,exception,duration,url,request, response&lt;/P&gt;

&lt;P&gt;The below is splunk log entry:&lt;BR /&gt;
2019-02-28 22:21:34.248 [UUID=d791aecb-c320-453a-9207-bf96e01beaaf|InteractionId=test_interaction_id1] INFO  com.test.MyLogger - service="TestService"||operation="testOperation"||url="&lt;A href="http://localhost:8080/testservice/v4/testOperation%22%7C%7Crequest=%22%7B%5C%22customer%5C%22:%7B%5C%22id%5C%22:%5C%2280%5C%22,%5C%22name%5C%22:%5C%22John%5C%22%7D%7D%22%7C%7Crequest_headers=%22%7BContent-Type=application/json,cache-control=no-cache,Accept=application/json%7D%22%7C%7Cresponse=%22%7B%5C%22customerType%5C%22:%5CFIXED%5C%22%7D%22%7C%7Cresponse_headers=%22%7BSet-Cookie=;secure;HttpOnly%7D%22%7C%7Cstatus=%22SUCCESS%22%7C%7Cstatus_code=%22200%22%7C%7Cduration=%2295ms" target="_blank"&gt;http://localhost:8080/testservice/v4/testOperation"||request="{\"customer\":{\"id\":\"80\",\"name\":\"John\"}}"||request_headers="{Content-Type=application/json,cache-control=no-cache,Accept=application/json}"||response="{\"customerType\":\FIXED\"}"||response_headers="{Set-Cookie=;secure;HttpOnly}"||status="SUCCESS"||status_code="200"||duration="95ms&lt;/A&gt;"&lt;/P&gt;

&lt;P&gt;request and response fields which are XML or JSON are not displayed properly in the table.&lt;BR /&gt;
JSON is dispalyed as {\&lt;/P&gt;

&lt;P&gt;I would like to have the complete JSON and XML in the table.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412517#M27068</guid>
      <dc:creator>amith7</dc:creator>
      <dc:date>2020-09-29T23:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON/XML from string entry and dispalying in table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412518#M27069</link>
      <description>&lt;P&gt;I am trying to extract various fields from below entry in splunk.&lt;/P&gt;

&lt;P&gt;I executed the below splunk query :&lt;BR /&gt;
index=test_index source="testlogs.log" "InteractionId=test_interaction_id1" | search("||url") | table service,operation,status,status_code,exception,duration,url,request, response&lt;/P&gt;

&lt;P&gt;The below is splunk log entry:&lt;BR /&gt;
2019-02-28 22:21:34.248 [UUID=d791aecb-c320-453a-9207-bf96e01beaaf|InteractionId=test_interaction_id1] INFO com.test.MyLogger - service="TestService"||operation="testOperation"||url="&lt;A href="http://localhost:8080/testservice/v4/testOperation%22%7C%7Crequest=%22%7B%5C%22customer%5C%22:%7B%5C%22id%5C%22:%5C%2280%5C%22,%5C%22name%5C%22:%5C%22John%5C%22%7D%7D%22%7C%7Crequest_headers=%22%7BContent-Type=application/json,cache-control=no-cache,Accept=application/json%7D%22%7C%7Cresponse=%22%7B%5C%22customerType%5C%22:%5CFIXED%5C%22%7D%22%7C%7Cresponse_headers=%22%7BSet-Cookie=;secure;HttpOnly%7D%22%7C%7Cstatus=%22SUCCESS%22%7C%7Cstatus_code=%22200%22%7C%7Cduration=%2295ms" target="_blank"&gt;http://localhost:8080/testservice/v4/testOperation"||request="{\"customer\":{\"id\":\"80\",\"name\":\"John\"}}"||request_headers="{Content-Type=application/json,cache-control=no-cache,Accept=application/json}"||response="{\"customerType\":\FIXED\"}"||response_headers="{Set-Cookie=;secure;HttpOnly}"||status="SUCCESS"||status_code="200"||duration="95ms&lt;/A&gt;"&lt;/P&gt;

&lt;P&gt;request and response fields which are XML or JSON are not displayed properly in the table.&lt;BR /&gt;
JSON is dispalyed as {\&lt;/P&gt;

&lt;P&gt;I would like to have the complete JSON and XML in the table.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:28:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412518#M27069</guid>
      <dc:creator>amith7</dc:creator>
      <dc:date>2020-09-29T23:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON/XML from string entry and dispalying in table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412519#M27070</link>
      <description>&lt;P&gt;@amith7 What does the raw event look like? Your code post isn't clear. To be clear, please edit your question, highlighting the event and then using the code tool button. That's the button that looks like the &lt;CODE&gt;101010&lt;/CODE&gt;.&lt;BR /&gt;
Without more information, the JSON doesn't look standard. I would use the rex (short for regular expression) command to slice out exactly what you want into a new field.&lt;BR /&gt;
Here's the documentation for the rex command: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/SearchReference/Rex"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/SearchReference/Rex&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 22:22:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412519#M27070</guid>
      <dc:creator>efavreau</dc:creator>
      <dc:date>2019-03-01T22:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting JSON/XML from string entry and dispalying in table</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412520#M27071</link>
      <description>&lt;P&gt;You've just re-posted the original question twice without fixing the error, improving the formatting, or adding clarifying information.  Help us help you!&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2019 00:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Extracting-JSON-XML-from-string-entry-and-dispalying-in-table/m-p/412520#M27071</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-03-02T00:20:22Z</dc:date>
    </item>
  </channel>
</rss>

