Open elezar opened 2 hours ago
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"}]}}
@klihub @bart0sh what are youre thoughts here? I'm willing to concede that this isn't too important, but reading generated specs becomes cumbersome expecially since the kind information is at the end of the file.
kind
When outputing the following spec as YAML:
We get the following output:
Which does not maintain ordering of the fields as defines in the spec.
The JSON output is as follows: