Skip to content

[ 2374929 ] Parsing harmed by '+' operator #367

@HolQue

Description

@HolQue

JSON (index starts with '+' operator):

"index"      : 1,
"listvalues" : [1, 2, 3],
"param"      : ${listvalues}[+${index}]

Result:

Error: 'Could not resolve expression '${listvalues}[+1]'. Reason: list indices must be integers, not str'!

Why is '+${index}' interpreted as string? '+1' is a positive integer. In my opinion such a '+' character can be ignored (because has no effect).

Cross check with '-' operator

"index"      : 1,
"listvalues" : [1, 2, 3],
"param"      : ${listvalues}[-${index}]

Blocked slicing detected properly:

Slicing is not supported (expression: '${listvalues}[-${index}]')

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions