YAML parsing error - multidimensional arrays YAML parsing error - multidimensional arrays symfony symfony

YAML parsing error - multidimensional arrays


Further to the accepted answer, a more readable way would be to take it out of inline like...

cases:    -         id: 213        status: 1    -         id: 213        status: 3        events:            - { rec: both, event: 34}             - { rec: odd, event: 1 }            - { rec: even, event: 2 }            - { rec: odd, event: 29 }            - { rec: odd, event: 9 }            - { rec: even, event: 3 }            - { rec: odd, event: 27 }            - { rec: even, event: 27 }


If you declare inline, you must make it on 1 line

cases:    - { id: 213, status: 1}    - { id: 213, status: 3, events:[ { rec: both, event: 34} , { rec: odd, event: 1} , { rec: even, event: 2}, { rec: odd, event: 29} , { rec: odd, event: 9}, { rec: even, event: 3},  { rec: odd, event: 27},  { rec: even, event: 27}  ]}