Update to latest jsonld.js.
--- a/playground/jsonld.js Tue Apr 15 23:44:01 2014 -0400
+++ b/playground/jsonld.js Thu Apr 17 12:38:41 2014 -0400
@@ -792,7 +792,6 @@
* (default: false).
* [useNativeTypes] true to convert XSD types into native types
* (boolean, integer, double), false not to (default: false).
- *
* @param callback(err, output) called once the operation completes.
*/
jsonld.fromRDF = function(dataset, options, callback) {
@@ -831,9 +830,9 @@
// check supported formats
rdfParser = options.rdfParser || _rdfParsers[options.format];
if(!rdfParser) {
- throw new JsonLdError(
+ return callback(new JsonLdError(
'Unknown input format.',
- 'jsonld.UnknownFormat', {format: options.format});
+ 'jsonld.UnknownFormat', {format: options.format}));
}
}
else {
@@ -1299,6 +1298,9 @@
}
$.ajax({
url: url,
+ accepts: {
+ json: 'application/ld+json'
+ },
dataType: 'json',
crossDomain: true,
success: function(data, textStatus, jqXHR) {