test-fullautomation / python-jsonpreprocessor

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

Square brackets within strings not accepted #241

Closed HolQue closed 1 month ago

HolQue commented 2 months ago

Something went wrong caused by changes between 13.03.2024 and 14.03.2024.

The JsonPreprocessor does not accept square brackets within strings any more.

JSON Code:

"WelcomeString": "Hello... ROBFW (testversion) [SelfTest] is running now!"

Result:

Error: 'Invalid syntax! A sub-element in Hello... ROBFW (testversion) [SelfTest] is running now! has to enclosed in quotes.'!

No issue in case of the string inside the square brackets contains blanks: [Self Test].

And with empty square brackets:

"WelcomeString": "Hello... ROBFW (testversion) [] is running now!"

Result:

Expression 'Hello... ROBFW (testversion) [] is running now!' cannot be evaluated. Reason: Empty pair of square brackets detected.

namsonx commented 2 months ago

Hello Holger,

Thank you for your findings! This issue was solved on stabi branch.

Thank you, Son

HolQue commented 2 months ago

Retest successful. Code examples from above are computed properly now. Issue can be closed.

test-fullautomation commented 1 month ago

integrated in RobotFramework AIO 0.11.0