# Query Parameters that are Dictionarys

**URL:** <https://softwaremill.community/t/query-parameters-that-are-dictionarys/166>\
**Category:** tapir\
**Created:** [March 29, 2023, 12:01am UTC](https://softwaremill.community/t/query-parameters-that-are-dictionarys/166 "2023-03-29T00:01:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayashah](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/mayashah/32/123_2.png) [@mayashah](https://softwaremill.community/u/mayashah)\
**Post date:** [March 29, 2023, 12:01am UTC](https://softwaremill.community/t/query-parameters-that-are-dictionarys/166/1 "2023-03-29T00:01:19Z")

</div>

Hello,

I want to define a query parameter for an endpoint like so:

```auto

@endpointInput("path")
case class Input(
  @annotations.query("object")
  object: Option[MyCustomObject],
)

case class MyCustomObject(
  foo: Int, 
  bar: String
)
 

```

where this endpoint accepts requests like at a path uri like “path?object[foo]=0&object[bar]=baz”

Is this possible to do with a custom codec?

---

<div class="post-metadata">

**Author:** ![adamw](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/adamw/32/28_2.png) [@adamw](https://softwaremill.community/u/adamw)\
**Post date:** [March 29, 2023, 11:34am UTC](https://softwaremill.community/t/query-parameters-that-are-dictionarys/166/2 "2023-03-29T11:34:40Z")

</div>

I’m afraid this type of functionality (objects passed through query parameters) isn’t yet supported. Please create a feature request.

For the time being, you’ll have to manually extract the query parameters and map them to your object. The `@query` annotation only supports extracting query parameters where the name matches the argument exactly.
