FromJSON make a list from multiple fields
问题 I have an object to parse that looks a bit like this : { "data": [ { "virtio0": "some text", "virtio1": "blah", "ide2": "some other text", "cores": 1, "mem": 512, ... }, { // The same ... } ] } Now I basically want to parse that into a [VM], but my problem is those numbered fields. Depending on the VM config, it might or might not have virtioX fields, ideX fields .. and I don't see a way to know in advance, nor to guess the numbers. I was thinking the best might be to define a Disk type that