<?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: Can you help me with a line breaking issue in a Multi-line JSON file input with an array of records? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-with-a-line-breaking-issue-in-a-Multi-line-JSON/m-p/394784#M70465</link>
    <description>&lt;P&gt;I found the following to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRUNCATE = 0
SHOULD_LINEMERGE = false
PREAMBLE_REGEX = ^\s*\[\s*$
LINE_BREAKER = }(,\s*[\r\n]*\s*){
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 09 Jan 2019 18:44:43 GMT</pubDate>
    <dc:creator>reed_kelly</dc:creator>
    <dc:date>2019-01-09T18:44:43Z</dc:date>
    <item>
      <title>Can you help me with a line breaking issue in a Multi-line JSON file input with an array of records?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-with-a-line-breaking-issue-in-a-Multi-line-JSON/m-p/394783#M70464</link>
      <description>&lt;P&gt;I have input files from MS Graph with pretty-printed JSON that looks something like the following (ellipses used liberally...). I am unable to find the right LINE_BREAKER value or BREAK_ONLY_BEFORE or BREAK_ONLY_AFTER to split the records on the comma between the }, and the {. Note that this sample has had the indentation with extra spaces removed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    [
        {
            "@odata.type":  "#Microsoft.graph....",
            "id":  "...",
            "...":  "...",
            "foobar":  { 
                                  "foo1":  "bar1",
                                  "foo2":  "bar2",
                            },
            "...":  "...",
            "barfoo":  {
                                  "bar1":  "foo1",
                                  "bar2":  "foo2",
                            }
        },
        {
            "@odata.type":  "#Microsoft.graph....",
            "id":  "...",
            "...":  "...",
        },
        {
            "...":  "...",
            "...":  "...",
        }
    ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This props.conf fails, because there are other }, strings within each record (see end of "foobar"):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json]
TRUNCATE = 0
KV_MODE = json
TIME_PREFIX = \"xxxEventDateTime\":\"
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%6N
MUST_BREAK_AFTER = \s*}\,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is for a 6.5.x Splunk hwf feeding a 6.5.x indexer cluster.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:40:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-with-a-line-breaking-issue-in-a-Multi-line-JSON/m-p/394783#M70464</guid>
      <dc:creator>reed_kelly</dc:creator>
      <dc:date>2020-09-29T22:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with a line breaking issue in a Multi-line JSON file input with an array of records?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-with-a-line-breaking-issue-in-a-Multi-line-JSON/m-p/394784#M70465</link>
      <description>&lt;P&gt;I found the following to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRUNCATE = 0
SHOULD_LINEMERGE = false
PREAMBLE_REGEX = ^\s*\[\s*$
LINE_BREAKER = }(,\s*[\r\n]*\s*){
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Jan 2019 18:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-you-help-me-with-a-line-breaking-issue-in-a-Multi-line-JSON/m-p/394784#M70465</guid>
      <dc:creator>reed_kelly</dc:creator>
      <dc:date>2019-01-09T18:44:43Z</dc:date>
    </item>
  </channel>
</rss>

