I have a YAML structure with dynamic schema e.g. I can have the following yaml:
array:
- name: myvar
val: 1
- name: mymap
val: [ 1, 2]
Goyaml maps yaml to Go struct, which should declare definite type. Here, val
is either a signle number, or an array or even a map.
Which is the best solution for this situation?