You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
blanks inside key names are not allowed. Also the naming convention tells that only letters, digits and some assorted special characters are allowed. Blanks are not part of this list of allowed special characters. Therefore this
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.
The text was updated successfully, but these errors were encountered: