Skip to content

Nested json objects don't work #271

@amandesai01

Description

@amandesai01

Environment

Node version: v19.8.1

Reproduction

  • Run test in the PR.

Describe the bug

Following nested keys don't work, they get generated using withQuery, but work with getQuery.

// This test passes.
{
      input: "/",
      query: { foo: 2, bar: { k: "v" } },
      out: "/?foo=2&bar=%7B%22k%22:%22v%22%7D",
},
// THIS TEST FAILS
"https://foo.com/?foo=2&bar=%7B%22k%22:%22v%22%7D": {
      foo: 2,
      bar: { k: "v" },
},

Additional context

Root issue: nuxt/nuxt#30249

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions