jsonld-markup

0.2.1 • Public • Published

jsonld-markup

Pretty print JSON-LD to HTML, adding hyperlinks to the keys (from the JSON-LD context).

jsonld-markup is adapted from json-markup.

var code = document.querySelector('code');
var data = JSON.parse(code.textContent.trim());
code.innerHTML = jsonldMarkup(data, {'@vocab': "http://schema.org/"})

Note: a context must be specified (this module won't fetch an existing context).

License

Apache 2.0

Readme

Keywords

Package Sidebar

Install

npm i jsonld-markup

Weekly Downloads

1

Version

0.2.1

License

Apache-2.0

Last publish

Collaborators

  • scienceai
  • sballesteros