# Nested Json throws error "can't merge a non object mapping \[field\] with an object mapping \[field\]"

**URL:** <https://discuss.elastic.co/t/nested-json-throws-error-cant-merge-a-non-object-mapping-field-with-an-object-mapping-field/188123>\
**Category:** Logstash\
**Created:** [June 29, 2019, 4:24am UTC](https://discuss.elastic.co/t/nested-json-throws-error-cant-merge-a-non-object-mapping-field-with-an-object-mapping-field/188123 "2019-06-29T04:24:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suresh2011](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Suresh2011](https://discuss.elastic.co/u/Suresh2011)\
**Post date:** [June 29, 2019, 4:24am UTC](https://discuss.elastic.co/t/nested-json-throws-error-cant-merge-a-non-object-mapping-field-with-an-object-mapping-field/188123/1 "2019-06-29T04:24:05Z")

</div>

Hi,

I have a nested json dataset of 2 layers which consist of around 1300 fields in the second layer. I am getting the below error for some fields

ERROR:  
type =\> illegal\_argument\_exception  
reason =\> can't merge a non object mapping [field] with an object mapping [field]

**Observations I found so far:**  
1] When I tried to remove the field with error, the error starts coming for some other field randomly (mostly with boolean or integer data type)  
2] When I tried to remove all the nested fields using remove\_field filter, except the one comes with error, it is getting parsed.

I am sorry I cannot share the data as it is confidential, please find the below config file which I use

input{  
file {  
path =\> "C:/Users/suresh/Documents/logs/\*"  
sincedb\_path =\> C:\Users\suresh\Documents\sincedb\_path\_dev"  
codec =\> "json"  
start\_position =\> beginning  
}  
}

output{  
elasticsearch {  
action =\> "index"  
hosts =\> "localhost:9200"  
index =\> "logs-dev-%{+yyyy-MM-dd}"  
}  
}

---

<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 27, 2019, 4:24am UTC](https://discuss.elastic.co/t/nested-json-throws-error-cant-merge-a-non-object-mapping-field-with-an-object-mapping-field/188123/2 "2019-07-27T04:24:10Z")

</div>

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