Skip to content

FR: Multiple load methods #8

Open

Description

@LecrisUT

ruamel.yaml has support for round-trip loading and dumping which preserves comments, anchors, tags and format (or at least it should). Having an equivalent feature here would be necessary for moving away from ruamel.yaml. If this can be added inside the native clojure implementation, then that's a big step up since in ruamel.yaml this is only supported for the pure python implementation

Activity

  1. ingydotnet commented on Aug 24, 2026

    @ingydotnet
    Member

    @LecrisUT Thanks. Several YAML implementations roundtrip comments. go-yaml, yaml.js, snakeyaml-engine, ruamel and others.

    They all do it differently and all have their of sets of bugs.

    There is no way to fully support comment roundtripping, but there are multiple ways to partially do it.

    YAMLStar (and go-yaml and later pyyaml) are about to support a plugin system and one of the plugin ideas is comment loading and dumping. YAMLStar will provide a couple plugins for comments and give the ability for anyone else to write their own if they don't like the default ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions