# Mapper\_parsing\_exception when indexing JSON with id property name

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception-when-indexing-json-with-id-property-name/308493>\
**Category:** Elasticsearch\
**Created:** [June 29, 2022, 3:55pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-when-indexing-json-with-id-property-name/308493 "2022-06-29T15:55:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolovalladolid](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@paolovalladolid](https://discuss.elastic.co/u/paolovalladolid)\
**Post date:** [June 29, 2022, 3:55pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-when-indexing-json-with-id-property-name/308493/1 "2022-06-29T15:55:26Z")

</div>

This is the error message:

`Elasticsearch.Net.ElasticsearchClientException: 'Request failed to execute. Call: Status code 400 from: PUT /developer-api-portal/_doc/d63ec56a-c5af-4c1c-a0e0-14340658aa86. ServerError: Type: mapper_parsing_exception Reason: "failed to parse field [target.old.id] of type [float] in document with id 'd63ec56a-c5af-4c1c-a0e0-14340658aa86'. Preview of field's value: 'c7e83a25-d324-4a53-a464-c433a57360ba'" CausedBy: "Type: number_format_exception Reason: "For input string: "c7e83a25-d324-4a53-a464-c433a57360ba"""'`

This is the JSON fragment that is causing the issue:

```auto
{
  "id": "c7e83a25-d324-4a53-a464-c433a57360ba",
  "type": "Admin",
  "value": "PaoloTestScope"
}

```

Looks like we cannot use any property with id in the property name, because Elasticsearch always treats it like a number.

We cannot change the JSON property names, because the JSON was serialized from the class Microsoft.Graph.PermissionScope, which is not under our control.

What are some workarounds that we can try?

---

<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 27, 2022, 3:55pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-when-indexing-json-with-id-property-name/308493/2 "2022-07-27T15:55:36Z")

</div>

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