2013-12-23 28 views

回答

3

它應該以你擁有它的方式工作,如果你真的把它縮進了它似乎你做的。所以也許這是你的解析器中的一個錯誤。

這似乎與SnakeYAML工作 - 複製粘貼你的代碼片段到http://instantyaml.appspot.com/回報:

%YAML 1.1 
--- 
!!map { 
    ? !!str "description" 
    : !!str "#This is not a comment#\nSome more text.", 
} 
... 

基本上是一樣的,當你嘗試同樣的例子,而不散列:

%YAML 1.1 
--- 
!!map { 
    ? !!str "description" 
    : !!str "This is not a comment\nSome more text.", 
} 
... 
相關問題