# Ingest multiple json files under a folder

**URL:** <https://discuss.elastic.co/t/ingest-multiple-json-files-under-a-folder/190026>\
**Category:** Logstash\
**Created:** [July 11, 2019, 1:33pm UTC](https://discuss.elastic.co/t/ingest-multiple-json-files-under-a-folder/190026 "2019-07-11T13:33:06Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [July 11, 2019, 2:06pm UTC](https://discuss.elastic.co/t/ingest-multiple-json-files-under-a-folder/190026/5 "2019-07-11T14:06:48Z")

</div>

If you want to ingest the entire file as a single event then use a multiline codec that never matches and a timeout

```
codec => multiline { pattern => "^Spalanzani" negate => true what => previous auto_flush_interval => 1 }

```

If you have multiple objects which are pretty-printed, so that a line just containing } indicates the end of an object use

```
codec => multiline { pattern => "^}" negate => true what => next auto_flush_interval => 1 }
```

---

_[View the full topic](https://discuss.elastic.co/t/ingest-multiple-json-files-under-a-folder/190026)._
