public function getSerializer(Request $req)
    {
        $modelSerializer = new ModelSerializer($req);
        $jsonSerializer = new JsonSerializer($req);

        $serializer = new ChainedSerializer();
        $serializer->add($modelSerializer)
                   ->add($jsonSerializer);

        return $serializer;
    }