- Notifications
You must be signed in to change notification settings - Fork161
JSON for Linked Data's documentation and playground site
License
json-ld/json-ld.org
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is the source for thehttps://json-ld.org/ website.
JSON-LD (JavaScript Object Notation for Linking Data) is a lightweight LinkedData format. It is easy for humans to read and write. It is easy for machinesto parse and generate. It is based on the already successful JSON format andprovides a way to help JSON data interoperate at Web-scale. If you are alreadyfamiliar with JSON, writing JSON-LD is very easy. There is a smooth migrationpath from the JSON you use today, to the JSON-LD you will use in the future.These properties make JSON-LD an ideal Linked Data interchange language forJavaScript environments, Web services, and unstructured databases such asCouchDB and MongoDB.
If you are already using JSON-LD, add yourself to thelist of users in our wiki.
A simple example of a JSON object with added semantics::
{"@context":"https://json-ld.org/contexts/person.jsonld","@id":"http://dbpedia.org/resource/John_Lennon","name":"John Lennon","born":"1940-10-09","spouse":"http://dbpedia.org/resource/Cynthia_Lennon"}The example above describes a person whose name is John Lennon. The differencebetween regular JSON and JSON-LD is that the JSON-LD object above uniquelyidentifies itself on the Web and can be used, without introducing ambiguity,across every Web site, Web services and databases in operation today.
If you would like to play around with JSON-LD markup, you may do so here:
https://json-ld.org/playground/
If you are a developer, you may be interested in the official JSON-LD W3Cspecifications:
- JSON-LD 1.1 - A JSON-based Serialization for Linked Data
- JSON-LD 1.1 Processing Algorithms and API
- JSON-LD 1.1 Framing
A list of all previous specification drafts is also available.
- This site is published usingEleventy.
- The site is deployed usingCloudflare Pages.
- Theplayground has a special proxy to handle
http:URLs.
To develop this website locally:
# install dependenciesnpm i# to just build the static files to `_site/`npm run build# to rebuild the files on changesnpm run watch# to serve `_site/` with Cloudflare Pages feature supportnpm run pages# visit http://localhost:8788/
Additionally, if you want to use or test the playgroundhttp: proxy, also runtheWrangler server to emulate theCloudflare Pages Functions code:
npm run dev
The new Playground is build usingCodeMirror 6 and is integrated into thesurrounding UI usingpetite-vue.
playground/next/index.htmlhas the HTML and petite-vue markup-level codeplayground/next/editor.mjscontains the JS for setting up CodeMirror andattaching it to the DOM via petite-vue
Thenpm run build:editor command usesRollup to build the final JS bundleatplayground/next/editor.bundle.js which contains the browser ready JS code.
Only the first two should be edited. However,editor.bundle.js should be builtlocally and committed along with the rest of the site to avoid unnecessary buildtime/cost/waste at deployment time.
Google Analytics has been used on this site since 2013. There are two GAidentifiers in use:
- UA-40462488-1 for
primer/,spec/, andrequirements/ - UA-42886053-1 for everything else (per the default)
The default code can be overridden by settingga to a specific number (ex:40462488) in the page's front matter.
About
JSON for Linked Data's documentation and playground site
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.