You should use isArrayStarter here. The other thing is that by YAML spec, the array definition begins with '- ' (space after dash).