# Retrieving custom metadata from mapping type with NEST

**URL:** <https://discuss.elastic.co/t/retrieving-custom-metadata-from-mapping-type-with-nest/145816>\
**Category:** Elasticsearch\
**Created:** [August 23, 2018, 9:59pm UTC](https://discuss.elastic.co/t/retrieving-custom-metadata-from-mapping-type-with-nest/145816 "2018-08-23T21:59:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimc](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jimc](https://discuss.elastic.co/u/jimc)\
**Post date:** [August 23, 2018, 9:59pm UTC](https://discuss.elastic.co/t/retrieving-custom-metadata-from-mapping-type-with-nest/145816/1 "2018-08-23T21:59:16Z")

</div>

Hello.

I have an index for which I am storing custom metadata in the `_meta` field. When I retrieve the metadata using NEST via the `GetMapping<T>` method, the returned dictionary has values that are represented as internal types (e.g. `Nest.Json.Linq.JObject`, `Nest.Json.Linq.JArray`).

These values fail to cast back to the original types, and they also fail to cast to their `Newtonsoft.Json.Linq` counterparts. Since the types are internal, `ToObject<T>()` does not appear to be an option. Is there some other way that I am missing to get these values back into a useable form? Or is this perhaps something that was missed in transitioning to the internal serializer? I am setting up the connection with the `JsonNetSerializer.Default` serializer in order to address some similar issues with dynamic types.

I am using version 6.3.2 of both Elasticsearch and NEST.

Thanks.

Jim

---

<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:** [September 20, 2018, 9:59pm UTC](https://discuss.elastic.co/t/retrieving-custom-metadata-from-mapping-type-with-nest/145816/2 "2018-09-20T21:59:18Z")

</div>

Closed on September 20, 2018, 9:59pm UTC

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