Skip to content

Proposal: dotDelimited style for query serialization. #3084

Description

@maarlo

Regarding [ and ] must be urlencoded, I propose the usage of dot notation to serialize arrays and objects at query parameters.

Having the following array:

{
  "x": ["b","d","f"]
}

It could be serailized as:

?x.0=b&x.1=d&x.2=f 

Having the following object:

{
  "x": {
    "a": "b",
    "c": "d",
    "e": "f"
  }
}

It could be serailized as

?x.a=b&x.c=d&x.e=f

And mixing both of them:

{
  "x": [
    {
      "a": "b"
    },
    {
      "a": "d"
    }
  ]
}

It could be serailized as

?x.0.a=b&x.1.a=d

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    param serializationIssues related to parameter and/or header serialization

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions