Output n-quads for normalization.
authorDave Longley <dlongley@digitalbazaar.com>
Tue, 22 May 2012 15:14:22 -0400
changeset 677 400ed5a84508
parent 676 a141996335e7
child 678 45a56125d987
Output n-quads for normalization.
playground/playground.js
--- a/playground/playground.js	Tue May 22 14:26:11 2012 -0400
+++ b/playground/playground.js	Tue May 22 15:14:22 2012 -0400
@@ -201,12 +201,12 @@
     var options = {base: document.baseURI};
 
     if(playground.activeTab === 'tab-normalized') {
+      options.format = 'application/nquads';
       jsonld.normalize(input, options, function(err, normalized) {
         if(err) {
           return callback(err);
         }
-        $('#normalized').html(js_beautify(JSON.stringify(normalized),
-          {'indent_size': 2, 'brace_style': 'expand'}));
+        $('#normalized').html(playground.htmlEscape(normalized));
         callback();
       });
     }
@@ -248,7 +248,7 @@
           return callback(err);
         }
         $('#nquads').html(playground.htmlEscape(nquads));
-        return callback();
+        callback();
       });
     }
   };