Allow queries to be passed as anything that can be serialized to JSON