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

Commit 456a819

Browse files
authored
Merge pull request #367 from AKSW/fix/json-support-in-linkeddata-plugin
Fix JSON support in Linked Data plugin
2 parents ff5a9a7 + ef8f9f8 commit 456a819

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

extensions/linkeddataserver/LinkeddataPlugin.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,17 @@ class LinkeddataPlugin extends OntoWiki_Plugin
2828
*
2929
* @var array
3030
*/
31-
private $_typeMapping
32-
= array(
33-
DEFAULT_TYPE => 'html', // default is xhtml
34-
'text/html' => 'html', // we only deliver XML-compatible html
35-
'application/xhtml+xml' => 'html',
36-
'application/rdf+xml' => 'rdf',
37-
'text/n3' => 'n3',
38-
'text/turtle' => 'ttl',
39-
'application/rdf+json' => 'json',
40-
'application/json' => 'json',
41-
'application/xml' => 'html' // TODO: should this be xhtml or rdf?
42-
);
31+
private $_typeMapping = array(
32+
DEFAULT_TYPE => 'html', // default is xhtml
33+
'text/html' => 'html', // we only deliver XML-compatible html
34+
'application/xhtml+xml' => 'html',
35+
'application/rdf+xml' => 'rdf',
36+
'text/n3' => 'n3',
37+
'text/turtle' => 'ttl',
38+
'application/rdf+json' => 'json',
39+
'application/json' => 'json',
40+
'application/xml' => 'html' // TODO: should this be xhtml or rdf?
41+
);
4342

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

0 commit comments

Comments
 (0)