@clem822 I am trying to convey to you that the way the data is laid out externally has nothing to do with how the data is represented internally. That's where marshalling comes in. Please take a minute to think about how data in a JSON file, say, is different to how you would represent it within a
struct
, so that it's in a form that is most convenient for you to manipulate. Then consider how the data is read and written to the JSON file. Your problem is no different.