var serializer = new JsonNetSerializer(new ConnectionSettings(new Uri("http://localhost:9200")));
serializer.SerializeToString(typeMappingDescriptor);
but this is not really much different from just using an instance of the client. I'd recommend also using a singleton instance of the client if you need to serialize multiple objects as many caches are used internally.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.