Closed
Description
When outputing the following spec as YAML:
cdi.Spec{
Version: "v0.3.0",
Kind: "example.com/class",
ContainerEdits: cdi.ContainerEdits{
DeviceNodes: []*cdi.DeviceNode{
{
Path: "/dev/foo",
},
},
}
We get the following output:
---
cdiVersion: v0.3.0
containerEdits:
deviceNodes:
- path: /dev/foo
devices: null
kind: example.com/class
Which does not maintain ordering of the fields as defines in the spec.
The JSON output is as follows:
{"cdiVersion":"v0.3.0","kind":"example.com/class","devices":null,"containerEdits":{"deviceNodes":[{"path":"/dev/foo"}]}}