Actix-web form serialization of collections

Hi. When dealing with http forms in actix-web, do you know if there is any way to support lists or maps in the form serialization? Something like this:

#[derive(Serialize, Deserialize)]
pub struct MyParams {
    name: Vec<String>

async fn handle_post_1(params: web::Form<MyParams>) -> Result<HttpResponse> {

I've tried the above, but I get a blank screen with a "Parse error" message. In my form, I have:

name1: <input name="name" />
name2: <input name="name" />
name3: <input name="name" />

It would be cool if it even supported maps, i.e:

 <input name="" />

Where mylist is a Vec of Structs, and name is a field on that struct.

Any help appreciated, thanks!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.