Skip to content

[ 2374938 ] Naming convention violation (3) #355

@HolQue

Description

@HolQue

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions