Skip to content

[Feature] export should accept JSON arrays as well as JSONL #1261

@EmperorArthur

Description

@EmperorArthur

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions