But the question is: Shall the second option be allowed? Is this a confirmed syntax?
The second option is Robot Framework style. And there might be users who intuitively assume that this style is possible also in JSON configuration files.
Consequence 1:
If we allow this, the syntax switch CJsonPreprocessor(syntax="python") makes no sense any more. Because the second option also works with CJsonPreprocessor(syntax="json")
Instead of
it is also possible to to this:
The result in both cases is:
{'param1': True, 'param2': False, 'param3': None}
But the question is: Shall the second option be allowed? Is this a confirmed syntax?
The second option is Robot Framework style. And there might be users who intuitively assume that this style is possible also in JSON configuration files.
Consequence 1:
If we allow this, the syntax switch
CJsonPreprocessor(syntax="python")
makes no sense any more. Because the second option also works withCJsonPreprocessor(syntax="json")
See also https://github.com/test-fullautomation/python-jsonpreprocessor/issues/224
Consequence 2:
If we allow this, it must work everywhere. But this does not work:
"param4" : {"A" : ${True}, "B" : 2}
Result:
Error: 'Invalid nested parameter format: ${True}, "B" - The double quotes are missing!!!'!
With reduced content it works again:
"param4" : {"A" : ${True}}
Cross check:
"param1" : ${true}
Result:
Error: 'The variable '${true}' is not available!'!
OK, in this case it's detected that something does not exist.
Open questions:
Shall we allow this:
"param1" : ${True}
?Shall we allow this:
"param1" : ${true}
?Do we want
CJsonPreprocessor(syntax="json")
to suppress this:"param1" : ${True}
?