title: Unmarshalling YAML to ordered maps
body: <p>I am trying to unmarshal the following YAML with <a href="https://godoc.org/gopkg.in/yaml.v3" rel="nofollow noreferrer">Go YAML v3</a>.</p>
  <pre><code>model:
    name: mymodel
    default-children:
    - payment
  
    pipeline:
      accumulator_v1:
        by-type:
          type: static
          value: false
        result-type:
          type: static
          value: 3
  
      item_v1:
        amount:
          type: schema-path
          value: amount
        start-date:
          type: schema-path
          value: start-date
  </code></pre>
  <p>Under pipeline is an arbitrary number of ordered items. The struct to which this should be unmarshalled looks like this:</p>
  <pre><code>type PipelineItemOption struct {
          Type string
          Value interface{}
  }
  
  type PipelineItem struct {
          Options map[string]PipelineItemOption
  }
  
  type Model struct {
          Name string
          DefaultChildren []string `yaml:&quot;default-children&quot;`
          Pipeline orderedmap[string]PipelineItem    // &quot;pseudo code&quot;
  }
  </code></pre>
  <p>How does this work with Golang YAML v3? In v2 there was MapSlice, but that is gone in v3.</p>