<?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 How to configure props.conf to parse JSON data structures? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-parse-JSON-data-structures/m-p/129037#M26488</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have the following JSON data structure which I'm trying to parse as three separate events. Can somebody please show how a should define my props.conf. This is what I currently have but its only extracting a single event. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fruits_source]
KV_MODE = json
LINE_BREAKER = "(^){"
NO_BINARY_CHECK = 1
TRUNCATE = 0
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;json data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "fruits": [
        {
            "fruit": "orange",
            "location": "tray1",
            "date": "6/20/2014",
            "instances_1": [
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ],
            "instances_2": [
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ]
        },
        {
            "fruit": "lemon",
            "location": "tray2",
            "date": "6/20/2015",
            "instances_1": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ],
            "instances_2": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "b",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "c",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ]
        },
        {
            "fruit": "clementine",
            "location": "tray3",
            "date": "6/20/2016",
            "instances_1": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ],
            "instances_2": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "b",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "c",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ]
        }
    ]
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 Sep 2014 20:19:55 GMT</pubDate>
    <dc:creator>carlskii</dc:creator>
    <dc:date>2014-09-17T20:19:55Z</dc:date>
    <item>
      <title>How to configure props.conf to parse JSON data structures?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-parse-JSON-data-structures/m-p/129037#M26488</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have the following JSON data structure which I'm trying to parse as three separate events. Can somebody please show how a should define my props.conf. This is what I currently have but its only extracting a single event. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[fruits_source]
KV_MODE = json
LINE_BREAKER = "(^){"
NO_BINARY_CHECK = 1
TRUNCATE = 0
SHOULD_LINEMERGE = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;json data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "fruits": [
        {
            "fruit": "orange",
            "location": "tray1",
            "date": "6/20/2014",
            "instances_1": [
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ],
            "instances_2": [
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "orange",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ]
        },
        {
            "fruit": "lemon",
            "location": "tray2",
            "date": "6/20/2015",
            "instances_1": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ],
            "instances_2": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "b",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "c",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ]
        },
        {
            "fruit": "clementine",
            "location": "tray3",
            "date": "6/20/2016",
            "instances_1": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ],
            "instances_2": [
                {
                    "name": "a",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "b",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                },
                {
                    "name": "c",
                    "type": "citrus",
                    "shape": "round",
                    "status": "ok"
                }
            ]
        }
    ]
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Sep 2014 20:19:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-parse-JSON-data-structures/m-p/129037#M26488</guid>
      <dc:creator>carlskii</dc:creator>
      <dc:date>2014-09-17T20:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to parse JSON data structures?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-parse-JSON-data-structures/m-p/129038#M26489</link>
      <description>&lt;P&gt;BTW I'm using Splunk 6.1.3&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2014 20:21:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-parse-JSON-data-structures/m-p/129038#M26489</guid>
      <dc:creator>carlskii</dc:creator>
      <dc:date>2014-09-17T20:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to parse JSON data structures?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-parse-JSON-data-structures/m-p/129039#M26490</link>
      <description>&lt;P&gt;LINE_BREAKER has to have something to consume, and ^ is an anchor, not a character per se. Try the following instead.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
LINE_BREAKER = ([&amp;lt;BACKSLASH&amp;gt;n&amp;lt;BACKSLASH&amp;gt;r]+){&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Replace the &amp;lt;BACKSLASH&amp;gt; with a literal backslash character (I can't get it to display on the forum text for some reason).&lt;/P&gt;

&lt;P&gt;This says "break on a newline followed immediately by a { character".&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 22:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-parse-JSON-data-structures/m-p/129039#M26490</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2014-09-19T22:43:10Z</dc:date>
    </item>
  </channel>
</rss>

