# Logstash 1.5.0 json filter output to elasticsearch fails on nested json

**URL:** <https://discuss.elastic.co/t/logstash-1-5-0-json-filter-output-to-elasticsearch-fails-on-nested-json/2241>\
**Category:** Logstash\
**Created:** [June 9, 2015, 5:24pm UTC](https://discuss.elastic.co/t/logstash-1-5-0-json-filter-output-to-elasticsearch-fails-on-nested-json/2241 "2015-06-09T17:24:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Hochstetler](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@Justin\_Hochstetler](https://discuss.elastic.co/u/Justin_Hochstetler)\
**Post date:** [June 9, 2015, 5:24pm UTC](https://discuss.elastic.co/t/logstash-1-5-0-json-filter-output-to-elasticsearch-fails-on-nested-json/2241/1 "2015-06-09T17:24:56Z")

</div>

Hi all,

I am attempting to use logstash 1.5.0 to take in a json log file, parse via the json filter , and output to elasticsearch via the elasticsearch output with a protocol of 'http'.

One of our two logs works okay, but the other has nested json where the logline includes a list of packets that were received as part of the event. These lines return a 400 error in the logstash log.  
The logstash.log shows the text of the object, but the offending sub-objects show up as:

"whateverobj"=\>#Java::JavaUtil::ArrayList:0x1c38ba8f,

rather than actual readable text.

If I use ruby filter to flatten the nested json-filter-parsed object into event-level flattended properties,like: nestedobj1.prop1, nestedobj1.prop2, nestedobj2.prop1, etc and then use mutate filter remove\_field to remove the original objects that the json filter itself added, the error in the log goes away and the event makes it to the ES index.

Is there a known problem with nested JSON in the json filter? It seems to have trouble mostly with objects that contain lists of objects. Is there a best-practices workaround for it?

Thanks very much!  
Justin

---

<div class="post-metadata">

**Author:** ![Justin\_Hochstetler](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@Justin\_Hochstetler](https://discuss.elastic.co/u/Justin_Hochstetler)\
**Post date:** [June 9, 2015, 5:36pm UTC](https://discuss.elastic.co/t/logstash-1-5-0-json-filter-output-to-elasticsearch-fails-on-nested-json/2241/2 "2015-06-09T17:36:52Z")

</div>

Hehe. It filtered out the whateverobj part:

"whateverobj"=\>#Java::JavaUtil::ArrayList:0x1c38ba8,

---

<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:** [July 6, 2017, 5:37am UTC](https://discuss.elastic.co/t/logstash-1-5-0-json-filter-output-to-elasticsearch-fails-on-nested-json/2241/3 "2017-07-06T05:37:59Z")

</div>


