jolocom / jolocom-lib

Library for interacting with the identity solution provided by Jolocom.
MIT License
24 stars 18 forks source link

Support validation of arbitrary Json-LD documents. #368

Closed Exulansis closed 4 years ago

Exulansis commented 5 years ago

Description

We should add a class / function to aid validating arbitrary Json-LD documents. This is useful for validating Did Documents and Verifiable Credentials which don't map to our classes (i.e. class-transformer fails to parse them correctly). One notable use case for this is being able to validate older version of Jolocom Did Documents and Verifiable Credentials without having to maintain too much backwards compatibility related logic in the class-transformer decorators.

Note: This issue was already addressed as part of issue #329 (PR #335) and eventually merged into 4.0-beta1 through #340. In order to simplify the review and feedback process, we decided it can be re-implemented (reusing existing code where possible) as a separate PR.

For reference purposes, please see the issues mentioned above, the comments on #335 and this notion document