# Why are hypen and underscores (HYPHEN-MINUS & LOW LINE) restricted as leading or trailing characters

**URL:** <https://discuss.jsonapi.org/t/why-are-hypen-and-underscores-hyphen-minus-low-line-restricted-as-leading-or-trailing-characters/2879>\
**Category:** Uncategorized\
**Created:** [July 9, 2024, 10:17pm UTC](https://discuss.jsonapi.org/t/why-are-hypen-and-underscores-hyphen-minus-low-line-restricted-as-leading-or-trailing-characters/2879 "2024-07-09T22:17:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SJrX](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@SJrX](https://discuss.jsonapi.org/u/SJrX)\
**Post date:** [July 9, 2024, 10:17pm UTC](https://discuss.jsonapi.org/t/why-are-hypen-and-underscores-hyphen-minus-low-line-restricted-as-leading-or-trailing-characters/2879/1 "2024-07-09T22:17:41Z")

</div>

I was just curious why member names had the restriction that \_ and - not be the first or last character (I understand space).

From [Section 7.8.1](https://jsonapi.org/format/#document-member-names).

I was hoping to use `_` for some internal stuff as a prefix, what would break?

---

<div class="post-metadata">

**Author:** ![sabrinaa](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/sabrinaa/32/882_2.png) [@sabrinaa](https://discuss.jsonapi.org/u/sabrinaa)\
**Post date:** [July 12, 2024, 6:09am UTC](https://discuss.jsonapi.org/t/why-are-hypen-and-underscores-hyphen-minus-low-line-restricted-as-leading-or-trailing-characters/2879/2 "2024-07-12T06:09:14Z")

</div>

> [@SJrX](#):
>
> I was just curious why member names had the restriction that \_ and - not be the first or last character (I understand space).
> 
> From [Section 7.8.1](https://jsonapi.org/format/#document-member-names).
> 
> I was hoping to use `_` for some internal stuff as a prefix, what would break?

Hey there 😇  
The rule about not using \_ or - as the first or last character in member names is likely to prevent issues with compatibility and readability. Using a prefix like \_ might cause confusion or conflicts in some systems. It’s best to follow the guidelines to avoid any problems. If you need a prefix, consider using letters or numbers instead.
