# XContentType.Json not working

**URL:** <https://discuss.elastic.co/t/xcontenttype-json-not-working/318834>\
**Category:** Elasticsearch\
**Created:** [November 14, 2022, 7:47am UTC](https://discuss.elastic.co/t/xcontenttype-json-not-working/318834 "2022-11-14T07:47:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![suresh\_chaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suresh_chaudhari/32/106602_2.png) [@suresh\_chaudhari](https://discuss.elastic.co/u/suresh_chaudhari)\
**Post date:** [November 14, 2022, 7:47am UTC](https://discuss.elastic.co/t/xcontenttype-json-not-working/318834/1 "2022-11-14T07:47:57Z")

</div>

IndexRequest iRequest = new IndexRequest(LoadBalancerVip+"9" , "\_doc");  
iRequest.source(flattenedJson,XContentType.JSON);  
This innocent XContentType.Json cannot insert more than 150 records neither it shows any bug try at your end.  
JVM usage disk usage are normal. Once I remove XContentType.json it works perfectly fine.  
Just incase if this helps someone  
Data to try  
`{"A":true,"B":"BVALUE","name":"Joe","C":"#C:ID","Key":29,"MYAddress":"11.11.111.0","from":"google.com"}"`  
type or paste code here

```auto

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 15, 2022, 12:38am UTC](https://discuss.elastic.co/t/xcontenttype-json-not-working/318834/2 "2022-11-15T00:38:57Z")

</div>

It's not really clear what your problem is here sorry, as it's very hard to follow your post. Please consider editing it and making things clearer.

---

<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:** [December 13, 2022, 12:39am UTC](https://discuss.elastic.co/t/xcontenttype-json-not-working/318834/3 "2022-12-13T00:39:22Z")

</div>

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