Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #367 from AKSW/fix/json-support-in-linkeddata-plugin
Browse files Browse the repository at this point in the history
Fix JSON support in Linked Data plugin
  • Loading branch information
splattater authored Aug 5, 2016
2 parents ff5a9a7 + ef8f9f8 commit 456a819
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions extensions/linkeddataserver/LinkeddataPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@ class LinkeddataPlugin extends OntoWiki_Plugin
*
* @var array
*/
private $_typeMapping
= array(
DEFAULT_TYPE => 'html', // default is xhtml
'text/html' => 'html', // we only deliver XML-compatible html
'application/xhtml+xml' => 'html',
'application/rdf+xml' => 'rdf',
'text/n3' => 'n3',
'text/turtle' => 'ttl',
'application/rdf+json' => 'json',
'application/json' => 'json',
'application/xml' => 'html' // TODO: should this be xhtml or rdf?
);
private $_typeMapping = array(
DEFAULT_TYPE => 'html', // default is xhtml
'text/html' => 'html', // we only deliver XML-compatible html
'application/xhtml+xml' => 'html',
'application/rdf+xml' => 'rdf',
'text/n3' => 'n3',
'text/turtle' => 'ttl',
'application/rdf+json' => 'json',
'application/json' => 'json',
'application/xml' => 'html' // TODO: should this be xhtml or rdf?
);

/**
* This method is called, when the onIsDispatchable event was triggered.
Expand Down Expand Up @@ -110,6 +109,7 @@ public function onIsDispatchable($event)
case 'rdf':
case 'n3':
case 'ttl':
case 'json':
// Check the config, whether provenance information should be included.
$prov = false;
if (isset($this->_privateConfig->provenance)
Expand Down

0 comments on commit 456a819

Please sign in to comment.