Symfony如何使用Serializer实体FOSRestController

I use FOSRestController for api and ExclusionPolicy and Expose for entity and I have two action for some logic but when I return entity $bits I want visible different fields, example for one action just id and created and second action only filed projectId. Because now I return filed who have annotation @Expose, but this is for all action. And I have question how to config entity fields for class BitController extends FOSRestController for another action ? I use @Groups({"list"}) and in controller

$bits = $this->get('serializer')->serialize(new Bit(), 'json', SerializationContext::create()->setGroups(array('list')));

but have $bits = {} maybe this because $bits array ?

/**
 * Bit
 *
 * @ORM\Table(name="bit")
 * @ORM\Entity(repositoryClass="Artel\ProfileBundle\Entity\Repository\BitRepository")
 * @ExclusionPolicy("all")
 */
class Bit
{
/**
 * @var integer
 *
 * @ORM\Column(name="id", type="integer")
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="AUTO")
 * @Expose()
 * @Groups({"list"})
 */
private $id;

/**
 * @var datetime $created
 *
 * @Gedmo\Timestampable(on="create")
 * @ORM\Column(type="datetime")
 * @Expose()
 */
private $created;

/**
 * @ORM\ManyToOne(targetEntity="Project", inversedBy="bit")
 * @ORM\JoinColumn(name="project_id", referencedColumnName="id", onDelete="CASCADE")
 *
 * @Groups({"list"})
 */
private $projectId;

class BitController extends FOSRestController
{
    public function getBitByProjectAction($id, $token)
    {
    $security = $this->get('security.context');
    $user = $this->getDoctrine()->getRepository('ArtelProfileBundle:Users')->findOneBySecuritytoken($token);

    if (!empty($user) || $security->isGranted('ROLE_ADMIN') ) {
        $bits = $this->getDoctrine()->getManager()
            ->getRepository('ArtelProfileBundle:Bit')
            ->findBitByProject($id, $token);
        if (!$bits) {
            throw new NotFoundHttpException();
        }
                    $view = $this->view($bits, 200)
            ->setSerializationContext(SerializationContext::create()->setGroups(array('list')))
        ;

        return $this->handleView($view);


   public function getBitsProjectsAction($token)
   {
    $user = $this->getDoctrine()->getRepository('ArtelProfileBundle:Users')->findOneBySecuritytoken($token);
    $view = View::create();
    if (!empty($user) && !empty($token)) {
        $bits = $this->getDoctrine()->getRepository('ArtelProfileBundle:Bit')->findClientsBitsByProjects($token);
        $view->setStatusCode(200);
                   $view = $this->view($bits, 200)
            ->setSerializationContext(SerializationContext::create()->setGroups(array('list')))
        ;

        return $this->handleView($view);
    }else{
        $view->setStatusCode(101);
    }
    return $view;
}

SOLVED

            $view = $this->view($bits, 200)
            ->setSerializationContext(SerializationContext::create()->setGroups(array('list')))
        ;

        return $this->handleView($view);