Skip to content

YAML presentation ("cosmetic") controls #42

@VladimirAlexiev

Description

@VladimirAlexiev

As an information architect.
When serializing YAML.
I want control over all YAML presentation ("cosmetic") features.
So that I can obtain a YAML representation that is most readable and usable for my case.

What "cosmetic" features do I mean:

  • optional header --- and footer ...
  • Number of spaces used to indent
  • Use of flow-style vs block-style for particular pieces of YAML
  • Ordering of keys
  • Alias names
  • Formatting of text blocks
  • String quoting
  • Use of escapes and code points in strings
  • Serialization of booleans
  • etc etc

How to list all controllable features systematically?

Here are the options of some serializers:

Most of these are for Perl, could you please add links to serializers in other languages?

Maybe we should also turn to linters. https://megalinter.github.io/latest/descriptors/yaml/ can use 3 YAML linters:

Finally, this specifically aims to fix presentation, but currently has a somewhat limited set of options

Metadata

Metadata

Assignees

No one assigned

    Labels

    UCRIssue on Use Case/Recommendationout-of-scopeOut of Scope

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions