jsonld-dsl

0.0.7 • Public • Published

jsonld-dsl

jsonld-dsl is a DSL for building JSON-LD powered hypermedia services.

var schema = Namespace(
  Class('Thing'),
  Class('Blog'),
  Class('BlogPosting'),
  Property('name'),
  Property('url'),
  Property('blogPost'),
  Property('articleBody')
)

var post = schema.BlogPosting(
  URI('/entries/hydra-lite.json'),
  schema.name('Hydra Lite'),
  schema.url('http://eric.themoritzfamily.com/hydra-lite.html'),
  schema.articleBody('This is the article body...')
)

hydra support

This module declares the hydra namespace for you. See the documentation for more information

var hydra = require('jsonld-dsl').hydra

Readme

Keywords

none

Package Sidebar

Install

npm i jsonld-dsl

Weekly Downloads

7

Version

0.0.7

License

MIT

Last publish

Collaborators

  • ericmoritz