DSC icon indicating copy to clipboard operation
DSC copied to clipboard

--output-format should have a `json-array` option

Open SteveL-MSFT opened this issue 7 months ago • 1 comments

Summary of the new feature / enhancement

This is specific to dsc resource list and dsc extension list which returns JSONLines where each line is a JSON object. However, there's been some requests to have those commands emit a single JSON object that can be deserialized at once. To not break existing usage, we can add a as-json-array to the supported values. However, this option doesn't make sense for other cases like config and resource which returns a single JSON object.

Proposed technical implementation details (optional)

In the code, we'd have a separate enum for dsc resource/extension list with as-json-array

SteveL-MSFT avatar May 09 '25 20:05 SteveL-MSFT

dsc resource get --all --output-format json-array was added, so this should just be json-array

SteveL-MSFT avatar Jun 20 '25 21:06 SteveL-MSFT