# Why use XContent instead of Jackson?

**URL:** <https://discuss.elastic.co/t/why-use-xcontent-instead-of-jackson/24445>\
**Category:** Elasticsearch\
**Created:** [June 26, 2015, 4:42pm UTC](https://discuss.elastic.co/t/why-use-xcontent-instead-of-jackson/24445 "2015-06-26T16:42:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtraynham](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@mtraynham](https://discuss.elastic.co/u/mtraynham)\
**Post date:** [June 26, 2015, 4:42pm UTC](https://discuss.elastic.co/t/why-use-xcontent-instead-of-jackson/24445/1 "2015-06-26T16:42:13Z")

</div>

I see that XContent is an abstraction for handling content (cbor, yaml, smile, json), but Jackson already supports all these data formats.

> **[FasterXML/jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformat-smile)**
>
> jackson-dataformat-smile - (DEPRECATED) -- moved under \`jackson-dataformats-binary

  

> **[FasterXML/jackson-dataformat-yaml](https://github.com/FasterXML/jackson-dataformat-yaml)**
>
> jackson-dataformat-yaml - Jackson module to add YAML backend (parser/generator adapters)

  

> **[FasterXML/jackson-dataformat-cbor](https://github.com/FasterXML/jackson-dataformat-cbor)**
>
> jackson-dataformat-cbor - (DEPRECATED) -- moved under \`jackson-dataformats-binary\`

Potentially you could add xml, protobuf, avro, thrift into the mix as well.  
[https://github.com/FasterXML?utf8=✓&query=jackson-dataformat](https://github.com/FasterXML?utf8=%E2%9C%93&query=jackson-dataformat)

It would seem much cleaner if you just offered the POJO objects that need to be ser/de and let Jackson do it's magic, especially for the Java API where I find myself implementing POJO's representing the index mapping.

---

<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 6, 2017, 12:05am UTC](https://discuss.elastic.co/t/why-use-xcontent-instead-of-jackson/24445/2 "2017-07-06T00:05:09Z")

</div>


