# Nested json parsing dynamic types

**URL:** <https://discuss.elastic.co/t/nested-json-parsing-dynamic-types/148042>\
**Category:** Logstash\
**Created:** [September 11, 2018, 4:33am UTC](https://discuss.elastic.co/t/nested-json-parsing-dynamic-types/148042 "2018-09-11T04:33:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malli](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@Malli](https://discuss.elastic.co/u/Malli)\
**Post date:** [September 11, 2018, 4:33am UTC](https://discuss.elastic.co/t/nested-json-parsing-dynamic-types/148042/1 "2018-09-11T04:33:51Z")

</div>

I am parsing json format log message and that structure is dynamic. Example  
if i parse the log message some like {"file":"this is sample file"} parsing works fine and can search the log also in kibana.

Then tried to parse the log message something like {"file":{"name":"sample.txt","size":"32kb","type":"pdf"}}

This time it fails and throws exception like  
MapperParsingException[failed to parse [file]]; nested: IllegalArgumentException[unknown property [name]]

Please advise how i can fix this issue and parse the dynamic nested json in the logstash.

Appreciate your help.

---

<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:** [October 9, 2018, 4:33am UTC](https://discuss.elastic.co/t/nested-json-parsing-dynamic-types/148042/2 "2018-10-09T04:33:55Z")

</div>

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