W3C home > Mailing lists > Public > public-credentials@w3.org > August 2020

Re: Side project: JSON-LD checker

From: Orie Steele <orie@transmute.industries>
Date: Mon, 17 Aug 2020 13:00:41 -0500
Message-ID: <CAN8C-_+GSdVKV1FbJMpXNEy1apVgnpPnw6yOpUHdSHCjzquFAg@mail.gmail.com>
To: Manu Sporny <msporny@digitalbazaar.com>
Cc: "W3C Credentials CG (Public List)" <public-credentials@w3.org>
Here is the source code for ESLint VC Code Extension:
https://github.com/Microsoft/vscode-eslint

You would probably want to prompt the user to allow each context to be
cached, but I assume that extensions have some place to cache things like
that...

In future, `.jsonld` files might recommend you install such an extension,
and give you tooling similar to:

https://github.com/google/schema-dts

... but for contexts other than schema.org :)

We use this tool to ensure that JSON-LD VCs are valid regardless of if they
are used in an LD Proof or JWT.

https://github.com/transmute-industries/vc.js/blob/f828fea4990e9e7f91ec29ca4bafa1433fef4e82/packages/vc.js/src/vc-ld/checkCredential.ts#L2
https://github.com/transmute-industries/vc.js/blob/f828fea4990e9e7f91ec29ca4bafa1433fef4e82/packages/vc.js/src/vc-jwt/issue.ts#L35

And as I say this.... I note that we currently (as of
https://github.com/gjgd/jsonld-checker/blob/3cc241e07749c9fdef59652973d88180efc5274f/packages/lib/src/index.ts#L20)
don't pass a document loader to the check function.... which means the
remote contexts are all automatically downloaded...

We need to update this tool to use
https://github.com/transmute-industries/jsonld-document-loader and make it
take a custom documentLoader explicitly :)

OS



On Mon, Aug 17, 2020 at 9:14 AM Manu Sporny <msporny@digitalbazaar.com>
wrote:

> On 8/17/20 8:53 AM, Guillaume wrote:
> > Thought we'd share with the community, feedback welcome!
>
> Guillaume, this is awesome! Super helpful... basically, a JSON-LD
> linting tool (which we've needed for years).
>
> I'm wondering if there is a way to merge this into some sort of VS Code
> / jslint framework eventually.
>
> Great start, really useful set of tooling, thank you! :)
>
> -- manu
>
> --
> Manu Sporny - https://www.linkedin.com/in/manusporny/
> Founder/CEO - Digital Bazaar, Inc.
> blog: Veres One Decentralized Identifier Blockchain Launches
> https://tinyurl.com/veres-one-launches
>
>

-- 
*ORIE STEELE*
Chief Technical Officer
www.transmute.industries

<https://www.transmute.industries>
Received on Monday, 17 August 2020 18:01:07 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:25:02 UTC