Use the preserve_order feature of rust-yaml
86b8452
This improves the output from the yaml writer because the fields are not sorted alphabetically. e.g. 'type' is not at the bottom.