protected function buildEntityCreatePayload(EntityInterface $entity, array $context = []): string
    {
        return $this->getEntitySerializer()->serialize($entity, 'json', $context);
    }
protected function buildEntityCreatePayload(EntityInterface $entity, array $context = []): string
    {
        return $this->getEntitySerializer()->serialize($entity, 'json', $context);
    }
protected function buildEntityCreatePayload ( EntityInterface $ entity , array $ context = [ ] ) : string { return $ this -> getEntitySerializer ( ) -> serialize ( $ entity , 'json' , $ context ) ; }
Serializes the entity to a JSON payload for the request.

@param \Apigee\Edge\Entity\EntityInterface $entity
Entity to be serialized.
@param array $context
Context for the serializer.

@return string
JSON payload for the request.
Serializes the entity to a JSON payload for the request .