-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Some issues ago I proposed to handle key names containing blanks only, as empty names (that are not allowed). This still makes sense for me and is implemented properly.
But with the new 'keyPattern' parameter I can do this:
json_preprocessor = CJsonPreprocessor(keyPattern = " ")
and
" " : 2
Result:
Error: 'Error: Key name '' is invalid. Expected format: ' ''!
All is implemented like discussed, but nevertheless this result looks a bit strange.
I propose to make sure that the handling of blanks is aligned in the regular expressions and in key names.
I see two possibilities to handle this:
(1)
Similar to #424 we can handle
keyPattern = " "
as not supported and raise an exception.
(2)
The JsonPreprocessor must not execute a strip() on key names any more. But I have doubts that it makes sense to allow key names like " ".
Seems that we need a naming convention for user defined naming conventions.
Metadata
Metadata
Assignees
Labels
Projects
Status