test-fullautomation / python-jsonpreprocessor

A preprocessor for json files
Apache License 2.0
3 stars 2 forks source link

Empty key names accepted #352

Open HolQue opened 1 month ago

HolQue commented 1 month ago

JSON:

"" : "value"

Result:

DotDict({'': 'value'})

Empty strings are accepted as key name. Here I have doubts.

Cross check:

" " : "value"

Result:

Error: 'Invalid key name: " ". Key names have to start with a letter, digit or underscore.'!

That is OK, and in my opinion also an empty string should be an invalid key name.

test-fullautomation commented 1 month ago

Yes, empty string as key must cause an error message.