Context
What's your version of nuqs?
What framework are you using?
Which version of your framework are you using?
"@tanstack/react-router": "1.x"
"react": "18.x"
Description
When using Nuqs with the TanStack Router adapter,
search params containing objects or arrays of objects are incorrectly serialized into strings like: [object Object]
This causes parsing errors when using parseAsJson or custom parsers (e.g. shadcn-table sorting state).
Expected behavior:
The adapter should follow TanStack Router’s default serialization (JSON.stringify / JSON.parse) so that objects/arrays are stored as valid JSON strings in the URL.
We previously discussed this issue here:
#953 (comment)
Reference docs:
https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
Reproduction
Context
What's your version of
nuqs?What framework are you using?
Which version of your framework are you using?
Description
When using Nuqs with the TanStack Router adapter,
search params containing objects or arrays of objects are incorrectly serialized into strings like:
[object Object]This causes parsing errors when using
parseAsJsonor custom parsers (e.g. shadcn-table sorting state).Expected behavior:
The adapter should follow TanStack Router’s default serialization (
JSON.stringify/JSON.parse) so that objects/arrays are stored as valid JSON strings in the URL.We previously discussed this issue here:
#953 (comment)
Reference docs:
https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
Reproduction