https://github.com/dahlia/jld
JSON-LD CLI tools
https://github.com/dahlia/jld
json-ld
Last synced: 7 months ago
JSON representation
JSON-LD CLI tools
- Host: GitHub
- URL: https://github.com/dahlia/jld
- Owner: dahlia
- License: gpl-3.0
- Created: 2023-11-28T07:30:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T11:16:42.000Z (almost 2 years ago)
- Last Synced: 2025-02-05T14:14:49.696Z (9 months ago)
- Topics: json-ld
- Language: TypeScript
- Homepage: https://deno.land/x/jld
- Size: 32.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
`jld`: JSON-LD CLI tools
========================This is a small program that deals with JSON-LD. It can be used to:
- `-c`/`--compact=` a JSON-LD document according to a specified context
- `-e`/`--expand` a JSON-LD document and remove its context
- `-f`/`--flatten` a JSON-LD document so that all deep-level trees are
flattened to the top-level
- `-n`/`--normalize` a JSON-LD document using RDFC-1.0 (formerly URDNA2015)
so that it can be used for hashing, comparison, and so on
- serialize a document `-r`/`--to-rdf` (N-Quads)For more information, see `-h`/`--help`.
Installation
------------You can install `jld` using `deno install`:
~~~~ console
$ deno install --allow-read --allow-net https://deno.land/x/jld/jld.ts
~~~~Usage
-----You can simply pass a URL of a JSON-LD document to `jld`:
~~~~ console
$ jld --expand https://todon.eu/users/hongminhee
[
{
"https://www.w3.org/ns/activitystreams#alsoKnownAs": [
{
"@id": "https://mastodon.social/users/hongminhee"
}
],
...
}
]
~~~~Or a local file path:
~~~~ console
$ jld --expand ./document.jsonld
~~~~Or a JSON-LD document via the standard input:
~~~~ console
$ jld --expand < ./document.jsonld
~~~~