Skip to content

YAML output should use document separators #628

Closed
@JohnMcPMS

Description

@JohnMcPMS

Summary of the new feature / enhancement

YAML supports multiple documents in a single stream. However, the current YAML output separates "documents" only by an empty line. While this convention can work, it is fragile. Even built-in resources have "empty" lines in their descriptions (see Microsoft/OSInfo). Placing an explicit document separator between entries (such as those of dsc resource list) would allow parsing the output stream directly without the need to pre-process the documents into individual parts. It would also make the start of a new item much easier to find as a human reader.

Proposed technical implementation details (optional)

At a minimum, output a document start and end sequence for each "document" in the output. For a cleaner look, only output a document start sequence before each "document" after the first.

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