public function serialize($data, $format, array $context = array())
    {
        if ('jsonld' !== $format) {
            throw new UnexpectedValueException('Serialization for the format ' . $format . ' is not supported');
        }

        if (false === is_object($data)) {
            throw new \Exception('Only objects can be serialized');
        }

        return JsonLD::toString($this->doSerialize($data, true), true);
    }