# .net ElasticsearchClient internal json serializer

**URL:** <https://discuss.elastic.co/t/net-elasticsearchclient-internal-json-serializer/337219>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [June 29, 2023, 2:46pm UTC](https://discuss.elastic.co/t/net-elasticsearchclient-internal-json-serializer/337219 "2023-06-29T14:46:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jere/32/111811_2.png) [@Jere](https://discuss.elastic.co/u/Jere)\
**Post date:** [June 29, 2023, 2:46pm UTC](https://discuss.elastic.co/t/net-elasticsearchclient-internal-json-serializer/337219/1 "2023-06-29T14:46:50Z")

</div>

Hi, using the .net ElasticsearchClient is it possible to configure the DefaultRequestResponseSerializer to prevent the following exception?

```auto
  Elastic.Transport.UnexpectedTransportException
  Message=The maximum configured depth of 64 has been exceeded. Cannot read next JSON 
  Source=Elastic.Transport

```

We can find the option to configure the sourceSerializer but not the RequestResponse serializer.

---

<div class="post-metadata">

**Author:** ![stevejgordon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevejgordon/32/80912_2.png) [@stevejgordon](https://discuss.elastic.co/u/stevejgordon)\
**Post date:** [July 10, 2023, 10:54am UTC](https://discuss.elastic.co/t/net-elasticsearchclient-internal-json-serializer/337219/2 "2023-07-10T10:54:37Z")

</div>

Hi @Jere,

There's currently no option to configure the request/response serializer. I'm curious as to which endpoint and response are causing this. Can you provide basic repro steps and details in an issue on the [repository](https://github.com/elastic/elasticsearch-net) so we can assess how best to resolve this?

---

<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:** [August 7, 2023, 10:54am UTC](https://discuss.elastic.co/t/net-elasticsearchclient-internal-json-serializer/337219/3 "2023-08-07T10:54:38Z")

</div>

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