-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
How to handle leading and trailing blanks inside key names?
JSON:
" param " : "value"
Result:
DotDict({' param ': 'value'})
I have doubts that it makes sense to allow this.
But if leading blanks are part of a key name, than this is a naming convention violation. Because the naming convention tells: Key names have to start with a letter, digit or underscore. And a blank is nothing of them.
Cross check (forbidden character added):
" #param " : "value"
Result:
Invalid key name: " #param ". Key names have to start with a letter, digit or underscore.
Conclusion: The leading blanks are part of the key name, but not involved in the naming convention check. In my opinion this is inconsistent.