PowerShell / PowerShell/DSC

[Feature] `export` should accept JSON arrays as well as JSONL

Open
#1,261 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Enhancement Needs Triage
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

Summary of the new feature / enhancement

As someone who just created their first resource, I expected the export option to accept a simple JSON array. It took me way too long to find the correct documentation and realize I needed to write an adapter.

Note, this is separate from: #1232

Example of a command which should not require a separate program just to re-parse JSON:

python -m pip --no-input list --format=json
Proposed technical implementation details (optional)

DSC should dynamically determine if said output is a JSON array or in JSONL format.

This can be done by examining the first non-white space character returned.

  • If it is [ the output is an array of objects. Each object matching the existing schema.
  • If it is { the output is in JSONL format.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the export input parsing and the existing JSONL handling. Use the python -m pip --no-input list --format=json example to compare array output with the current format; done means export accepts both JSON arrays and JSONL objects without a separate adapter.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.