I'd like to store an arbitrary length structured data collection in a Solana account... Something like what [{foo: "bar"}, {foo: "quux"}] would be in JS, ideally with arbitrary nesting in the objects. I'm thinking to store this in a Vec<T> within the Rust structs (is this the right approach?) but it's quite unclear how to send this over the wire with Anchor RPC, i.e., how to borsh encode it.
To be more specific, for instance I have this instruction but I don't know how to send data over to it using Anchor's program.rpc.createWorkSpec.
Any pointers?