# .net client (8.12) converts params data properties to camelCase but i use PascalCase

**URL:** <https://discuss.elastic.co/t/net-client-8-12-converts-params-data-properties-to-camelcase-but-i-use-pascalcase/353101>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [February 12, 2024, 7:05pm UTC](https://discuss.elastic.co/t/net-client-8-12-converts-params-data-properties-to-camelcase-but-i-use-pascalcase/353101 "2024-02-12T19:05:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nazim\_Kirma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nazim_kirma/32/131668_2.png) [@Nazim\_Kirma](https://discuss.elastic.co/u/Nazim_Kirma)\
**Post date:** [February 12, 2024, 7:05pm UTC](https://discuss.elastic.co/t/net-client-8-12-converts-params-data-properties-to-camelcase-but-i-use-pascalcase/353101/1 "2024-02-12T19:05:13Z")

</div>

Hi all,

I use .net client to index my documents. I use nested field to update arrays and add new objects. I use the PascalCase configuration for Properties.

This is my configuration :

```auto
var node = new SingleNodePool(new Uri(options.Value.Url));

			var connectionSettings = new ElasticsearchClientSettings(
				node,
				 sourceSerializer: (defaultSerializer, settings) =>
					new DefaultSourceSerializer(settings, o=> { o.DictionaryKeyPolicy = null; o.PropertyNamingPolicy = null; })
				)
				.Authentication(new BasicAuthentication(options.Value.UserName, options.Value.Password))
				
				.EnableDebugMode()
				.PrettyJson()
				.DefaultFieldNameInferrer(f => f)
				.RequestTimeout(TimeSpan.FromMinutes(2));
			
			
				

			ElasticClient = new ElasticsearchClient(connectionSettings);

```

With the script I wrote, I can change part of the directory I have and add new objects to it. The script works but **StoredScriptIdConveter** passes the data I give to the API as camelCase.

Here is the code :

```auto

public async Task UpdateNestedField<TIndexItem>(string indexName, string id, string scriptName, string fieldName, object[] data)
		{
			var res = await ElasticClient.UpdateAsync<TIndexItem,TIndexItem>(indexName, id, request =>
			{
				var storedScript = new StoredScriptId(scriptName);
				storedScript.Params = new Dictionary<string, object>();
				
				var name = fieldName;
				storedScript.Params.Add(name, data);
				var script = new Script(storedScript);
				
				request.Script(script).ScriptedUpsert(true);
				
			});

		}

```

The request to be sent to the API is below.

```auto
{
  "script": {
    "id": "test-class-dictionary-update",
    "params": {
      "DictionaryData": [
        {
          "id": "AB",
          "numberData": 789987
        },
        {
          "id": "YY",
          "numberData": 789789
        }
      ]
    }
  },
  "scripted_upsert": true
}

```

id and numberData fields are not passed to the script correctly. Therefore new properties are created.

```auto
{
  "Id.keyword": [
    "123123"
  ],
  "NumberData": [
    111
  ],
  "Id": [
    "123123"
  ]
},
{
  "id.keyword": [
    "YY"
  ],
  "id": [
    "YY"
  ],
  "numberData": [
    789789
  ]
}

```

Do you have any idea why this is happening?

---

<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:** [March 11, 2024, 7:06pm UTC](https://discuss.elastic.co/t/net-client-8-12-converts-params-data-properties-to-camelcase-but-i-use-pascalcase/353101/2 "2024-03-11T19:06:04Z")

</div>

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