Support models in query parameters by converting to json