jsonld-cli
A JSON-LD command line interface tool.
Last updated 3 years ago by davidlehn .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jsonld-cli 
SYNC missed versions from official npm registry.

jsonld-cli

Dependency Status

Introduction

This module provides a command line tool jsonld to manipulate JSON-LD data. It is written in JavaScript for node.js and uses the jsonld.js and jsonld-request. Inputs can be from stdin, URLs, or files.

Requirements

Installation

npm install -g jsonld-cli

Usage

The jsonld command line tool can be used to:

  • Transform JSON-LD to compact, expanded, normalized, or flattened form
  • Transform RDFa to JSON-LD
  • Normalize JSON-LD/RDFa Datasets to NQuads

To show tool options, a list of commands, or command options:

jsonld --help
jsonld COMMAND --help

To compact a document on the Web using a JSON-LD context published on the Web:

jsonld compact -c "https://w3id.org/payswarm/v1" "http://recipes.payswarm.com/?p=10554"

The command above will read in a PaySwarm Asset and Listing in RDFa 1.0 format, convert it to JSON-LD expanded form, compact it using the 'https://w3id.org/payswarm/v1' context, and dump it out to the console in compacted form.

jsonld normalize -q "http://recipes.payswarm.com/?p=10554"

The command above will read in a PaySwarm Asset and Listing in RDFa 1.0 format, normalize the data using the RDF Dataset normalization algorithm, and then dump the output to normalized NQuads format. The NQuads can then be processed via SHA-256, or similar algorithm, to get a deterministic hash of the contents of the Dataset.

Commercial Support

Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com

Source Code

http://github.com/digitalbazaar/jsonld-cli

Current Tags

  • 0.3.0                                ...           latest (3 years ago)

3 Versions

  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2021 © npmmirror.com |