# Does utf8json used in elastic v7.x support user defined custom formatters?

**URL:** <https://discuss.elastic.co/t/does-utf8json-used-in-elastic-v7-x-support-user-defined-custom-formatters/237283>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 11:29am UTC](https://discuss.elastic.co/t/does-utf8json-used-in-elastic-v7-x-support-user-defined-custom-formatters/237283 "2020-06-16T11:29:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [June 22, 2020, 8:05am UTC](https://discuss.elastic.co/t/does-utf8json-used-in-elastic-v7-x-support-user-defined-custom-formatters/237283/4 "2020-06-22T08:05:06Z")

</div>

> [@stoj](#):
>
> but what I'd like to know is does ES support the equivalent registering of user defined custom UTF8JSON serializers (aka formatters)?

No it does not. Utf8Json used internally is a fork of Utf8Json and all the types are `internal`. It's used for serializing requests and responses, and also use to serialize documents too, by default. There is no way to register custom formatters for documents however. Some simple customisation is exposed through attributes e.g. `StringEnumAttribute` to serialize `enum`s as strings, but nothing more complex. If custom serialization is required, I would recommend looking at `JsonNetSerializer` and custom converters for NEST 7.x and lower.

For NEST 8.x, we are looking at System.Text.Json for serialization and would likely expose custom formatters/converters for this.

---

_[View the full topic](https://discuss.elastic.co/t/does-utf8json-used-in-elastic-v7-x-support-user-defined-custom-formatters/237283)._
