# Json of varying length and multiline

**URL:** <https://discuss.elastic.co/t/json-of-varying-length-and-multiline/191689>\
**Category:** Logstash\
**Created:** [July 22, 2019, 5:09pm UTC](https://discuss.elastic.co/t/json-of-varying-length-and-multiline/191689 "2019-07-22T17:09:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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 23, 2019, 1:03pm UTC](https://discuss.elastic.co/t/json-of-varying-length-and-multiline/191689/4 "2019-07-23T13:03:08Z")

</div>

If you JSON is pretty-printed like that then you can make your pattern look for the non-indented } that ends the object

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

---

_[View the full topic](https://discuss.elastic.co/t/json-of-varying-length-and-multiline/191689)._
