Is there a way to deserialize url query string to to net struct directly?

I have net structs and want to de-serialize query string like "child.a=20&child.b=20" directly.
I can pass net values in url by utilizing querystring.

 #[derive(Deserialize, Serialize, PartialEq, Debug)]
struct ChildStruct {
    a: i32,
    b: i32,

#[derive(Deserialize, Serialize, PartialEq, Debug)]
struct Query {
    child: ChildStruct

// playground

  • reference

sample request in aliyun open api:
&<Common request parameters>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.