test-fullautomation / python-jsonpreprocessor

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

Error messages (29) #327

Open HolQue opened 3 weeks ago

HolQue commented 3 weeks ago

Previously this code

{
   "keyP"   : "A",
   "newparam" : ${keyP}[${keyP}]
}

caused newparam to have string value 'A['A']'.

With latest changes of the JsonPreprocessor this changes to newparam having string value 'A'.

Both is wrong. The correct error message would be

TypeError: string indices must be integers

namsonx commented 3 days ago

Hello Holger,

The change for this ticket was pushed to stabi branch. The error message in this case is: Exception: Could not resolve expression '${keyP}['A']'. Reason: string indices must be integers

Thank you, Son