# How to deal with the motoko language keyword as the record key name

**URL:** <https://forum.dfinity.org/t/how-to-deal-with-the-motoko-language-keyword-as-the-record-key-name/36335>\
**Category:** Language Support\
**Tags:** Motoko\
**Created:** [October 19, 2024, 8:32am UTC](https://forum.dfinity.org/t/how-to-deal-with-the-motoko-language-keyword-as-the-record-key-name/36335 "2024-10-19T08:32:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![haida](https://avatars.discourse-cdn.com/v4/letter/h/d9b06d/32.png) [@haida](https://forum.dfinity.org/u/haida)\
**Post date:** [October 19, 2024, 8:32am UTC](https://forum.dfinity.org/t/how-to-deal-with-the-motoko-language-keyword-as-the-record-key-name/36335/1 "2024-10-19T08:32:09Z")

</div>

When I convert JSON in the module serde ([Mops • Motoko Package Manager](https://mops.one/serde)), the JSON data key contains the type keyword, so it cannot be passed when defining the data type model.  
How to deal with this situation ni

Example JSON string

```json
{
type : "TriggerSmartContract",
other : "other"
}

```

Motoko does not support it

```motoko
type RawData = { 
  type : Text;
  other : Text
};

```

---

<div class="post-metadata">

**Author:** ![sea-snake](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/sea-snake/32/7243_2.png) [@sea-snake](https://forum.dfinity.org/u/sea-snake)\
**Post date:** [October 19, 2024, 8:47am UTC](https://forum.dfinity.org/t/how-to-deal-with-the-motoko-language-keyword-as-the-record-key-name/36335/2 "2024-10-19T08:47:20Z")

</div>

First thing that comes to mind that you could try is to put the key in double " or single ’ quotes.

Edit:

Adding \_ at the end of the key seems to work according to this thread [How to create a Motoko type which has a reserved word as a property identifier?](https://forum.dfinity.org/t/how-to-create-a-motoko-type-which-has-a-reserved-word-as-a-property-identifier/24035)
