# JSON Input showing up line by line

**URL:** <https://discuss.elastic.co/t/json-input-showing-up-line-by-line/83404>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 24, 2017, 11:21am UTC](https://discuss.elastic.co/t/json-input-showing-up-line-by-line/83404 "2017-04-24T11:21:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Conall\_Prendergast](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Conall\_Prendergast](https://discuss.elastic.co/u/Conall_Prendergast)\
**Post date:** [April 24, 2017, 11:21am UTC](https://discuss.elastic.co/t/json-input-showing-up-line-by-line/83404/1 "2017-04-24T11:21:21Z")

</div>

Hi,

I have a JSON file that I want to read and send to logstash. Each json entry is "pretty printed" (with lines). When this is fed to logstash, each line is a new event. ie. There are events with the following:

```
{
     "message": " }"
...
}

```

How can I make filebeat take a json object from the file and feed it into logstash. I have tried with a "json" input codec but I am not sure which "side" of the transaction we must specify as json.

Any help is appreciated,  
Thanks

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [April 24, 2017, 1:16pm UTC](https://discuss.elastic.co/t/json-input-showing-up-line-by-line/83404/2 "2017-04-24T13:16:16Z")

</div>

See this [issue](https://github.com/elastic/beats/issues/1208#issuecomment-274603603). You can combine mutliline with the decode\_json\_fields to accomplish this.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 22, 2017, 1:24pm UTC](https://discuss.elastic.co/t/json-input-showing-up-line-by-line/83404/3 "2017-05-22T13:24:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
