Tools/Mapper/Mapper.php
public function serializeWithGroup($data, $format, $group)
    {
        $serializer = $this->evaluator->getSerializer();

        return $serializer->serialize($data, $format, SerializationContext::create()->setGroups([$group]));
    }
public function serializeWithGroup($data, $format, $group)
    {
        $serializer = $this->evaluator->getSerializer();

        return $serializer->serialize($data, $format, SerializationContext::create()->setGroups([$group]));
    }
public function serializeWithGroup ( $ data , $ format , $ group ) { $ serializer = $ this -> evaluator -> getSerializer ( ) ; return $ serializer -> serialize ( $ data , $ format , SerializationContext :: create ( ) -> setGroups ( [ $ group ] ) ) ; }
Serialize the given datas into the expected format with a group.

@param $data
@param $format
@param $group

@return string
Serialize the given datas into the expected format with a group .