Skip to content

how to add indentation for array element #441

Closed

Description

@YK-Unit

When psych dump object to yaml file, I hope psych can add indentation for array element, for example:

parent:
  - child
  - child

And yet it is:

parent:
- child
- child

So I wonder how to add indentation for array element. Look forward to your solution, thanks very much.

Activity

  1. NickHackman commented on Jul 15, 2020

    @NickHackman

    Seconding this, it would be nice to have support for array indentation following the indentation option passed to dump or to_yaml would be ideal. If this already exists I haven't been able to find any sort of documentation referencing it.

    If it needs to be implemented then I'd be interested in implementing this feature 👍

  2. Paxa commented on Oct 19, 2022

    @Paxa

    It looks much better with indentation

  3. locked and limited conversation to collaborators on Oct 19, 2022
  4. converted this issue into a discussion #594 on Oct 19, 2022
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