test-fullautomation / python-jsonpreprocessor

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

Error messages (26) #324

Closed HolQue closed 1 month ago

HolQue commented 3 months ago

Previously this code

{
   "index"     : 1,
   "indexList" : [0,1,2],
   "param2"    : "${indexList}[${indexList}[[${index}]]"
}

caused

'Invalid expression found: '${indexList}[${indexList}[[${index}]]'.'

That is completely fine. The expression contains an additional opened square bracket. No chance to detect the meaning of this. Therefore the expression is simply "invalid".

With latest changes of the JsonPreprocessor the error message changed to:

'Invalid parameter format: $${indexList}[$${indexList}[[1]] - The double quotes are missing!!!'

This is misleading and wrong. The error message contains double '$$' and there are no double quotes missing.

Or in other words: Out of this invalid expression it cannot be concluded that double quotes are missing.

The previous error message should be restored.

namsonx commented 3 months ago

Hello Holger,

I fixed and pushed the change to stabi branch.

Thank you, Son

HolQue commented 2 months ago

Retest successful. Issue can be closed.