# Json codec vs. json\_lines codec for collecting mongoexport output JSON?

**URL:** <https://discuss.elastic.co/t/json-codec-vs-json-lines-codec-for-collecting-mongoexport-output-json/341616>\
**Category:** Logstash\
**Created:** [August 24, 2023, 8:25pm UTC](https://discuss.elastic.co/t/json-codec-vs-json-lines-codec-for-collecting-mongoexport-output-json/341616 "2023-08-24T20:25:34Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)\
**Post date:** [August 24, 2023, 10:51pm UTC](https://discuss.elastic.co/t/json-codec-vs-json-lines-codec-for-collecting-mongoexport-output-json/341616/8 "2023-08-24T22:51:03Z")

</div>

Thanks. removing -pretty resulted in a JSON file that Logstash attempted to parse this time, instead of not doing anything with it.

Looks like my next step is decide on a solution for mapping explosion. I'm grateful this article was posted. Will investigate and report back.

> [@Approaches to deal with "Limit of total fields \[1000\] in index has been exceeded"](https://discuss.elastic.co/t/approaches-to-deal-with-limit-of-total-fields-1000-in-index-has-been-exceeded/241039):
>
> This is a common warning seen due to what is commonly known as a mapping explosion. [The docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#mapping-limit-settings) go into this is more detail, but quickly (emphasis by the author); Defining too many fields in an index can lead to a mapping explosion, which can cause out of memory errors and difficult situations to recover from. Consider a situation where every new document inserted introduces new fields, such as with dynamic mapping. Each new field is added to the index mapping, which can become a problem as the …

---

_[View the full topic](https://discuss.elastic.co/t/json-codec-vs-json-lines-codec-for-collecting-mongoexport-output-json/341616)._
