# safeJsonBuilder missing from the XContentFactory in the 0.18.x versions

**URL:** <https://discuss.elastic.co/t/safejsonbuilder-missing-from-the-xcontentfactory-in-the-0-18-x-versions/6244>\
**Category:** Elasticsearch\
**Created:** [December 27, 2011, 5:33pm UTC](https://discuss.elastic.co/t/safejsonbuilder-missing-from-the-xcontentfactory-in-the-0-18-x-versions/6244 "2011-12-27T17:33:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danpolites](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danpolites/32/2136_2.png) [@danpolites](https://discuss.elastic.co/u/danpolites)\
**Post date:** [December 27, 2011, 5:33pm UTC](https://discuss.elastic.co/t/safejsonbuilder-missing-from-the-xcontentfactory-in-the-0-18-x-versions/6244/1 "2011-12-27T17:33:24Z")

</div>

We upgraded our Java application from es 0.17.8 to 0.18.6 and quickly  
realized that the safeJsonBuilder is not part of the 0.18.x  
XContentFactory API. Our application is currently using this method.  
Is there a replacement for it or is the json builder always safe now?

---

<div class="post-metadata">

**Author:** ![danpolites](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danpolites/32/2136_2.png) [@danpolites](https://discuss.elastic.co/u/danpolites)\
**Post date:** [December 27, 2011, 5:41pm UTC](https://discuss.elastic.co/t/safejsonbuilder-missing-from-the-xcontentfactory-in-the-0-18-x-versions/6244/2 "2011-12-27T17:41:01Z")

</div>

Note to self, read the release notes:

Java API: XContentFactory creation of XContentBuilder to always be  
“safe”

On Dec 27, 12:33 pm, danpolites [dpoli...@gmail.com](mailto:dpoli...@gmail.com) wrote:

> We upgraded our Java application from es 0.17.8 to 0.18.6 and quickly  
> realized that the safeJsonBuilder is not part of the 0.18.x  
> XContentFactory API. Our application is currently using this method.  
> Is there a replacement for it or is the json builder always safe now?

---

<div class="post-metadata">

**Author:** ![Kun\_Niu](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Kun\_Niu](https://discuss.elastic.co/u/Kun_Niu)\
**Post date:** [December 27, 2011, 6:08pm UTC](https://discuss.elastic.co/t/safejsonbuilder-missing-from-the-xcontentfactory-in-the-0-18-x-versions/6244/3 "2011-12-27T18:08:26Z")

</div>

jsonBuilder is refactored. I think you can use it.

Kun Niu

> -----Original Message-----  
> From: [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
> [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)] On Behalf Of danpolites  
> Sent: 2011年12月28日 1:33  
> To: elasticsearch  
> Subject: safeJsonBuilder missing from the XContentFactory in the 0.18.x  
> versions
> 
> We upgraded our Java application from es 0.17.8 to 0.18.6 and quickly  
> realized that the safeJsonBuilder is not part of the 0.18.x  
> XContentFactory  
> API. Our application is currently using this method.  
> Is there a replacement for it or is the json builder always safe now?

---

<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, 3:44am UTC](https://discuss.elastic.co/t/safejsonbuilder-missing-from-the-xcontentfactory-in-the-0-18-x-versions/6244/4 "2017-07-06T03:44:15Z")

</div>

Closed on July 6, 2017, 3:44am UTC


