Description:
We need to extend the CLI tool's parameter parsing to support arrays of objects. The current implementation supports parsing arrays by passing the same parameter name multiple times (e.g. --ParamName:value1 --ParamName:value2) and dictionaries by using key-value pairs (e.g. --KeyValueParam:Key=Value --KeyValueParam:OtherKey=OtherValue).
Proposed Solution:
Introduce an index into the parameter name to group properties for the same object. For example, the following syntax would represent an array of objects:
--Item[0]:Key=Value --Item[0]:OtherKey=OtherValue --Item[1]:Key=Value2 --Item[1]:OtherKey=OtherValue2
In this approach:
- Each object is identified by an index (e.g.,
[0], [1]).
- All key-value pairs with the same index belong to the same object.
- The parser should group these parameters and return an array of objects.
Acceptance Criteria:
-
Syntax:
The CLI tool should accept parameters in the format --Item[index]:Property=Value.
-
Grouping:
The parser must correctly group properties by their index and produce an array of objects.
-
Backward Compatibility:
Existing functionality for arrays and dictionaries should remain unchanged.
-
Documentation:
Update the user documentation to include the new syntax and provide examples.
Description:
We need to extend the CLI tool's parameter parsing to support arrays of objects. The current implementation supports parsing arrays by passing the same parameter name multiple times (e.g.
--ParamName:value1 --ParamName:value2) and dictionaries by using key-value pairs (e.g.--KeyValueParam:Key=Value --KeyValueParam:OtherKey=OtherValue).Proposed Solution:
Introduce an index into the parameter name to group properties for the same object. For example, the following syntax would represent an array of objects:
In this approach:
[0],[1]).Acceptance Criteria:
Syntax:
The CLI tool should accept parameters in the format
--Item[index]:Property=Value.Grouping:
The parser must correctly group properties by their index and produce an array of objects.
Backward Compatibility:
Existing functionality for arrays and dictionaries should remain unchanged.
Documentation:
Update the user documentation to include the new syntax and provide examples.