# Principal reserved word as field name in candid file

**URL:** https://forum.dfinity.org/t/principal-reserved-word-as-field-name-in-candid-file/8210
**Category:** Developers
**Created:** [October 29, 2021, 1:51am UTC](https://forum.dfinity.org/t/principal-reserved-word-as-field-name-in-candid-file/8210 "2021-10-29T01:51:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)
#### Post date: [October 29, 2021, 1:51am UTC](https://forum.dfinity.org/t/principal-reserved-word-as-field-name-in-candid-file/8210/1 "2021-10-29T01:51:12Z")

</div>

I am attempting to implement the extendable token standard in TypeScript (see [GitHub - lastmjs/azle: JavaScript/TypeScript CDK for the Internet Computer](https://github.com/lastmjs/azle)).

The extendable token standard implementation in Motoko has a variant with a field named `principal`: [extendable-token/ext-core.mo at main · Toniq-Labs/extendable-token · GitHub](https://github.com/Toniq-Labs/extendable-token/blob/main/standards/ext-core.mo#L9)

I am trying to create a hand-written candid file with that same variant:

```auto
type User = variant {
    address: text;
    principal: principal;
};

```

But I am getting an unexpected token error:

```bash
principal: principal;
  │ ^^^^^^^^^ Unexpected token
  │
  = Expects one of "decimal", "hex", "id", "text", "}

```

I assume this is because `principal` is a reserved word in candid. But…how can I match the Motoko variant which has a variant named `principal`?

---

<div class="post-metadata">

### Author: ![chenyan](https://avatars.discourse-cdn.com/v4/letter/c/35a633/32.png) [@chenyan](https://forum.dfinity.org/u/chenyan)
#### Post date: [October 29, 2021, 2:05am UTC](https://forum.dfinity.org/t/principal-reserved-word-as-field-name-in-candid-file/8210/2 "2021-10-29T02:05:25Z")

</div>

You can quote the field name: `"principal": principal`

---

<div class="post-metadata">

### Author: ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)
#### Post date: [October 29, 2021, 2:39am UTC](https://forum.dfinity.org/t/principal-reserved-word-as-field-name-in-candid-file/8210/3 "2021-10-29T02:39:50Z")

</div>

Thanks a lot, it works!
