3 ms·
Ok, I take your point, but let's say we need to share these credential objects between different systems that do not have prior knowledge of how to evaluate the
by sebmellen 5y ago
Ok, I take your point, but let's say we need to share these credential objects between different systems that do not have prior knowledge of how to evaluate the credential data. Also, let's say we constrain the logic to only allow for evaluation of any given part of the credential data against a binary "pass | fail" matrix.
What is a better way to share this important part of the schema (the matrix) without resorting to letting the "business logic" perform the evaluation? Optimally, any matrix should be able to run against the same business logic for evaluation.
Also, though I understand why you say that, we won't have "100 other yahoos doing this nonsense," and each schema would go through a pretty thorough review process.
- omegaworks 5y agoIf your business logic doesn't meet the needs of your business without the schema, the schema is a part of your business logic, that should be subjected to a suite of automated tests. If your concern is the sharability, consider making a library or service that provides the business logic.
- sebmellen 5y agoWe'd like to be able to include evaluation matrices within credentials as an extension to the Verifiable Credentials standard (see https://www.w3.org/TR/vc-data-model/ https://www.w3.org/TR/vc-data-model/). Optimally, different libraries and different services will be able to evaluate a credential using the credential's included matrix (i.e. the evaluation matrix should not be reliant on any business logic from any particular party). I can't get too deep into the use-case but having these parts bundled together is important for what we're working on.
- deleted 5y ago[deleted]
- valenterry 5y ago> but let's say we need to share these credential objects between different systems that do not have prior knowledge of how to evaluate the credential data Well, they _must_ have prior knowledge about it, because they must have to understand the concept of JsonLogic beforehand. So instead, you can just make these systems understand a proper programming language that can produce outputs. Something like https://github.com/dhall-lang/dhall-lang https://github.com/dhall-lang/dhall-lang would probably be a much better option for this usecase.
- sebmellen 5y agoWith the standard that we're working with (the W3C's "Verifiable Credentials" standard [0]) having something that's in JSON or at least "JSON-compatible" is quite important. [0]: https://www.w3.org/TR/vc-data-model/ https://www.w3.org/TR/vc-data-model/
- valenterry 5y agoNo problem, just serialize the dhall into a json string.
- nimchimpsky 5y agoyou haven't taken the point. JsonLogic is just an attempt to define a syntax, where no one wants one. No prior knowledge ? This is just false, its downloading the jsonlogic, and has been programmed to cope with jsonlogic. jsonlogic is an abomination.
- Seb-C 5y agoWhat about an "isValid" field returned by your API? Your problem is that you need the same logic in two places, and you can solve it by centralizing this logic in one place.