-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Previously this code
{
"keyA" : "keyA",
"keyB" : "keyB",
"dictParam" : {"keyA" : {}},
${dictParam.keyA}['${keyB}_2'] : 2
}
caused
'Identified dynamic name of key '${dictParam.keyA}['${keyB}_2']' that does not exist. But new keys can only be created based on hard code names.'
That's correct.
With latest changes of the JsonPreprocessor values are returned
{'dictParam': DotDict({'keyA': DotDict({'keyB_2': 2})}),
'keyA': 'keyA',
'keyB': 'keyB'}
The values are correct, but my understanding of the "implicit creation" feature is that the implicit creation based on dynamic key names shall be blocked.
Therefore I expect the previous error message.
Another aspect: It shall be possible to use parameter to refer to already existing keys. Therefore I change the code above to
{
"keyA" : "keyA",
"keyB" : "keyB",
"dictParam" : {"keyA" : {}},
// ${dictParam.keyA}['${keyB}_2'] : 2
${dictParam.${keyA}}['${keyB}_2'] : 2
}
The hard coded key name "keyA" is exchanged by a parameter ${keyA} with value "keyA".
Outcome:
Error: 'Could not set parameter '${dictParam.${keyA}}['${keyB}_2']' with value '2'! Reason: Key error 'keyB_2''!
Why is 'keyB_2' now handled as key error? Also in this case I would expect the first error message.
Metadata
Metadata
Assignees
Labels
Projects
Status