#custom queryParam serializer on the controller

1 messages · Page 1 of 1 (latest)

sharp birch
#

I know it's possible to create a custom queryParam serializer and deserializer on a route, but how do I do that on a controller?

prisma ridge
#

what do you mean by custom?

sharp birch
#

the queryParam is an array of objects. I want to customize how that array is serialized and deserialized

#

Because currently it's being serialized like this: ?filters=%5Bobject%20Object%5D%2C%5Bobject%20Object%5D%2C%5Bobject%20Object%5D

prisma ridge
#

you probably need to JSON.stringify it first, and then encodeURIComponent to make sure it's safe