Feature Request: Support YAML Array Length Counting
Summary
Add YAML array length counting to the Data Size Count extension. The extension should display the number of elements in a selected YAML array, similar to its existing data-size counting capabilities.
Example
Given this YAML:
tenants:
- name: a
- name: b
- name: c
When the user selects the tenants array, Data Size Count should report:
The feature should also support inline arrays:
environments: [development, testing, production]
Expected count:
Expected Behavior
- Detect when the selected YAML value is an array.
- Count only the array’s top-level elements.
- Return
0 for an empty array.
- Support arrays containing strings, numbers, objects, or nested arrays.
- Treat each nested array or object as one top-level element.
- Show a clear message when the selection is not a valid YAML array.
- Support both block-style and flow-style YAML arrays.
Use Cases
This feature would help users quickly:
- Check the number of entries in configuration arrays.
- Validate large YAML configuration files.
- Count tenants, endpoints, policies, hosts, or other repeated resources.
- Verify generated YAML without manually counting entries.
Acceptance Criteria
Feature Request: Support YAML Array Length Counting
Summary
Add YAML array length counting to the Data Size Count extension. The extension should display the number of elements in a selected YAML array, similar to its existing data-size counting capabilities.
Example
Given this YAML:
When the user selects the
tenantsarray, Data Size Count should report:The feature should also support inline arrays:
Expected count:
Expected Behavior
0for an empty array.Use Cases
This feature would help users quickly:
Acceptance Criteria
0.