SPYC ( https://github.com/mustangostang/spyc/ )で解析しようとしている次の YAML ビットがあります。
children:
- root:
- child one
- child two:
- subchild one
- subchild two
- child three
私はそれが次のようなものを返すことを期待しています:
["children"]=>array(1){
["root"]=>array(3){
[0]=>string(9) "child one",
["child two"]=>array(2){
[0]=>string(12) "subchild one"
[1]=>string(12) "subchild two"
}
[1]=>string(11) "child three"
}
}
代わりに、次のようなものを返します (空で不要な配列のように見えるものを含みます):
array(4) {
[0]=>
array(4) {
["root"]=>
array(0) {
}
[0]=>
string(9) "child one"
[1]=>
array(3) {
["child two"]=>
array(0) {
}
[0]=>
string(12) "subchild one"
[1]=>
string(12) "subchild two"
}
[2]=>
string(11) "child three"
}
YAML コンテンツを構造化した方法に何か問題があるのでしょうか、それとも SPYC (パーサー) に既知の問題がありますか?
ありがとう!