Json of varying length and multiline

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 }