# Is there a option to limit how deep the JSON parsing would go?

**URL:** https://discuss.elastic.co/t/is-there-a-option-to-limit-how-deep-the-json-parsing-would-go/360930
**Category:** Logstash
**Created:** [June 6, 2024, 7:50am UTC](https://discuss.elastic.co/t/is-there-a-option-to-limit-how-deep-the-json-parsing-would-go/360930 "2024-06-06T07:50:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![weily2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weily2/32/135078_2.png) [@weily2](https://discuss.elastic.co/u/weily2)
#### Post date: [June 6, 2024, 7:50am UTC](https://discuss.elastic.co/t/is-there-a-option-to-limit-how-deep-the-json-parsing-would-go/360930/1 "2024-06-06T07:50:53Z")

</div>

For a case where there are multiple applications going through an ingest pipeline with many unique nested fields multiple levels deep, it would be helpful if there was an option just like `max_depth` to limit how deep [the JSON parsing](https://www.elastic.co/guide/en/elasticsearch/reference/7.11/json-processor.html) would go.

for example:

```json
{"order":{"id":1,"to":{"name":"Joe Smith"},"from":{"country":"United States","City":"San Jose"}},"message":"Problem X, please fix order."}

```

It would be great to have a `max_depth` option as in Filebeat's `decode_json_fields` [processor](https://www.elastic.co/guide/en/beats/filebeat/current/decode-json-fields.html).
