nilportugues / php-json-api

JSON API transformer outputting valid (PSR-7) API Responses.
http://nilportugues.com
MIT License
70 stars 35 forks source link

JSONAPI - Forbid the usage of reserved characters in member names. #28

Closed nilportugues closed 9 years ago

nilportugues commented 9 years ago

To be :100: JSONAPI compilant this should be implemented.

http://jsonapi.org/format/#document-member-names-reserved-characters

plus:

Additionally, the following characters are allowed in member names, 
except as the first or last character:

U+002D HYPHEN-MINUS, "-"
U+005F LOW LINE, "_"
U+0020 SPACE, " " (not recommended, not URL safe)
nilportugues commented 9 years ago

https://github.com/nilportugues/json-api-transformers/commit/7e19b4b8223fefc07054c2a671473617c715f286