<?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: json parsing in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/json-parsing/m-p/575895#M200692</link>
    <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="2021-11-22 05:52:09.755 INFO - c.t.c.a.t.service.UserInfoService(101) - abcd | abcd-APP | /user-info | af4772c0-1fcd-4a82-858e-c2f7f0821724 | APP |
-| Response of validateAddress abcd Service: {
\"headers\" : { },
\"body\" : {
\"baseError\" : {
\"code\" : \"3033\",
\"reason\" : \"User is unauthorized\",
\"explanation\" : \"Unauthorized\"
}
},
\"statusCode\" : \"UNAUTHORIZED\",
\"statusCodeValue\" : 401
}"



| eval _time=strptime(_raw,"%F %T.%Q")
| rex "(?ms)Service: (?&amp;lt;response&amp;gt;.*)"
| spath input=response statusCode
| spath input=response statusCodeValue
| table _time statusCodeValue statusCode&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 22 Nov 2021 15:44:42 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-11-22T15:44:42Z</dc:date>
    <item>
      <title>json parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/json-parsing/m-p/575888#M200689</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have logs in below format, which is mix of delimiter (|) and json. now I want to extract statuscode and statuscodevalue and create table with columns _time,statuscodevalue,statuscode.&lt;/P&gt;&lt;P&gt;can someone please help me ?&lt;/P&gt;&lt;P&gt;2021-11-22 05:52:09.755 INFO - c.t.c.a.t.service.UserInfoService(101) - abcd | abcd-APP | /user-info | af4772c0-1fcd-4a82-858e-c2f7f0821724 | APP |&lt;BR /&gt;-| Response of validateAddress abcd Service: {&lt;BR /&gt;"headers" : { },&lt;BR /&gt;"body" : {&lt;BR /&gt;"baseError" : {&lt;BR /&gt;"code" : "3033",&lt;BR /&gt;"reason" : "User is unauthorized",&lt;BR /&gt;"explanation" : "Unauthorized"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"statusCode" : "UNAUTHORIZED",&lt;BR /&gt;"statusCodeValue" : 401&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 14:41:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/json-parsing/m-p/575888#M200689</guid>
      <dc:creator>onthakur</dc:creator>
      <dc:date>2021-11-22T14:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: json parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/json-parsing/m-p/575895#M200692</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="2021-11-22 05:52:09.755 INFO - c.t.c.a.t.service.UserInfoService(101) - abcd | abcd-APP | /user-info | af4772c0-1fcd-4a82-858e-c2f7f0821724 | APP |
-| Response of validateAddress abcd Service: {
\"headers\" : { },
\"body\" : {
\"baseError\" : {
\"code\" : \"3033\",
\"reason\" : \"User is unauthorized\",
\"explanation\" : \"Unauthorized\"
}
},
\"statusCode\" : \"UNAUTHORIZED\",
\"statusCodeValue\" : 401
}"



| eval _time=strptime(_raw,"%F %T.%Q")
| rex "(?ms)Service: (?&amp;lt;response&amp;gt;.*)"
| spath input=response statusCode
| spath input=response statusCodeValue
| table _time statusCodeValue statusCode&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Nov 2021 15:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/json-parsing/m-p/575895#M200692</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-22T15:44:42Z</dc:date>
    </item>
  </channel>
</rss>

