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
그러나 나는 선행 공백을 보존하고 싶습니다.
- tag: xyz
description: |1
This is a multi-line comment and I want to preserve
leading white spaces and new line
다음 블록 스칼라 추가 들여 쓰기 하나 공간이 것이라는 1
주 (현재의 들여 쓰기 수준 이외에)이 줄 것이다 :
This is a multi-line comment and I want to preserve
leading white spaces and new line
YAML 지정에 따르면 YAML 파일의 키 설명에 대한 값에 선행 공백이 없습니다. 그러므로 보존 할 것이 없습니다. – Anthon