1
私は上記読み取ると、私はYamlReader(yamlbeans.YamlReader)でYAMLファイル
- tag: xyz
description: |
This is multi-line comment and I want to preserve
leading white spaces and new line
を読んでいます
を読みながら、先頭の空白文字を維持する方法:これは、以下与え
String descr = tag.get("description");
出力:
This is multi-line comment and I want to preserve
leading white spaces and new line
しかし、先行する空白を保存します。
YAML仕様によると、YAMLファイルのキー 'description'の値の先頭に空白がありません。したがって、保存するものはありません。 – Anthon