# NEST, can't disable indenting

**URL:** <https://discuss.elastic.co/t/nest-cant-disable-indenting/20362>\
**Category:** Elasticsearch\
**Created:** [October 21, 2014, 11:50am UTC](https://discuss.elastic.co/t/nest-cant-disable-indenting/20362 "2014-10-21T11:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lasseschou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lasseschou/32/845_2.png) [@lasseschou](https://discuss.elastic.co/u/lasseschou)\
**Post date:** [October 21, 2014, 11:50am UTC](https://discuss.elastic.co/t/nest-cant-disable-indenting/20362/1 "2014-10-21T11:50:50Z")

</div>

This is my code:

var connectionSettings = new ConnectionSettings(new  
SniffingConnectionPool(nodes));  
connectionSettings.SetJsonSerializerSettingsModifier(settings =\>  
{  
settings.Formatting = Formatting.None;  
});  
var nestClient = new ElasticClient(connectionSettings);

I previously used [ElasticSearch.NET](http://ElasticSearch.NET) directly, and I had no problem setting  
formatting to "Formatting.None", but when using NEST, whenever I index a  
document, it's indented. This is an example of an Index call:

nestClient.Index(obj, i =\> i.Index(index).Type("user").Id(key));

Thanks for helping me out here!

Lasse

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/94096399-d47b-4f64-adf7-ca3d049d70c1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/94096399-d47b-4f64-adf7-ca3d049d70c1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:54am UTC](https://discuss.elastic.co/t/nest-cant-disable-indenting/20362/2 "2017-07-06T00:54:46Z")

</div>

Closed on July 6, 2017, 12:54am UTC


