<?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: How can I strip the headers for JSON to parse correctly? Currently not working! in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210780#M61623</link>
    <description>&lt;P&gt;Unfortunately this didn't work for me, if I am adding data in manually to test, would I be able to see this in the UI or only at search time?&lt;/P&gt;

&lt;P&gt;Additionally, for the BREAK_ONLY_BEFORE, do I want everything leading up the the {\"creationTime or everything after?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:14:06 GMT</pubDate>
    <dc:creator>danfein</dc:creator>
    <dc:date>2020-09-29T12:14:06Z</dc:date>
    <item>
      <title>How can I strip the headers for JSON to parse correctly? Currently not working!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210778#M61621</link>
      <description>&lt;P&gt;I am trying to remove the header of my JSON data but my current setup will not work, it continues to parse with the header (and therefore doesn't actually parse!).&lt;/P&gt;

&lt;P&gt;The header / beginning of the JSON looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-12-29T14:52:53-05:00 17.1.9.10 {"creationTime": 1483993708000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcename]
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
CHARSET=UTF-8
INDEXED_EXTRACTIONS=json
category=Structured
disabled=false
pulldown_type=true
TZ=America/New_York
SEDCMD-StripHeader = s/^[^{]+//
KV_MODE = json
EXTRACT-_time={"creationTime":
TIME_PREFIX=\{\"creationTime\"\:
TZ=America/New_York
MAX_TIMESTAMP_LOOKAHEAD=13
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea why this is not working?&lt;/P&gt;

&lt;P&gt;Many thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2016 21:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210778#M61621</guid>
      <dc:creator>danfein</dc:creator>
      <dc:date>2016-12-29T21:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I strip the headers for JSON to parse correctly? Currently not working!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210779#M61622</link>
      <description>&lt;P&gt;I had similar issue and was solved using answers &lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/117121/extract-json-data-within-the-logs.html"&gt;https://answers.splunk.com/answers/117121/extract-json-data-within-the-logs.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I would split the logic into two parts. (1) To extract whole JSON out  (2) To extract key value pairs within JSON&lt;BR /&gt;
In props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;### props.conf
 [myjson]
 REPORT-json = report-json,report-json-kv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[report-json]       
 # This will get the json payload from the logs. 
 REGEX = (?P&amp;lt;json1&amp;gt;{\"creationTime\".+)

  [report-json-kv]
  SOURCE_KEY = json1
  KV_MODE = json
  NO_BINARY_CHECK = 1
  TRUNCATE = 0
  TIME_PREFIX=\{\"creationTime\"\:
  TZ=America/New_York
  SHOULD_LINEMERGE = true
  BREAK_ONLY_BEFORE = someregularexpression
  MAX_TIMESTAMP_LOOKAHEAD=13
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Dec 2016 04:45:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210779#M61622</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2016-12-30T04:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I strip the headers for JSON to parse correctly? Currently not working!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210780#M61623</link>
      <description>&lt;P&gt;Unfortunately this didn't work for me, if I am adding data in manually to test, would I be able to see this in the UI or only at search time?&lt;/P&gt;

&lt;P&gt;Additionally, for the BREAK_ONLY_BEFORE, do I want everything leading up the the {\"creationTime or everything after?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:14:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210780#M61623</guid>
      <dc:creator>danfein</dc:creator>
      <dc:date>2020-09-29T12:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I strip the headers for JSON to parse correctly? Currently not working!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210781#M61624</link>
      <description>&lt;P&gt;The above settings are REPORT. So search time. You can change to "TRANSFORMS-json" to make it index time.&lt;BR /&gt;
break_only_before is something you need to try out and test as I don't have the full json. normally it is  &lt;CODE&gt;}\n&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:14:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210781#M61624</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2020-09-29T12:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I strip the headers for JSON to parse correctly? Currently not working!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210782#M61625</link>
      <description>&lt;P&gt;Ok I will try to make this work; it may be unorthodox but do you have Skype or teamviewer? This is really driving me in circles! &lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 18:27:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210782#M61625</guid>
      <dc:creator>danfein</dc:creator>
      <dc:date>2016-12-30T18:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I strip the headers for JSON to parse correctly? Currently not working!</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210783#M61626</link>
      <description>&lt;P&gt;I really don't understand how this works/breaks down. Can you describe the approach, please?&lt;/P&gt;</description>
      <pubDate>Sat, 31 Dec 2016 20:34:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-strip-the-headers-for-JSON-to-parse-correctly/m-p/210783#M61626</guid>
      <dc:creator>danfein</dc:creator>
      <dc:date>2016-12-31T20:34:12Z</dc:date>
    </item>
  </channel>
</rss>

