/** * Method to serialise an EasyRdf_Graph to RDF/JSON * * http://n2.talis.com/wiki/RDF_JSON_Specification * docs/appendix-a-rdf-formats-json.md * * @param EasyRdf_Graph $graph An EasyRdf_Graph object. * @param string $format The name of the format to convert to. * @param array $options * @throws EasyRdf_Exception * @return string The RDF in the new desired format. */ public function serialise($graph, $format, array $options = array()) { return json_encode(parent::serialise($graph, 'php')); }
public function testSerialiseUndefined() { $this->setExpectedException('EasyRdf_Exception', 'This method should be overridden by sub-classes.'); $serialiser = new EasyRdf_Serialiser(); $serialiser->serialise($this->graph, 'format'); }