Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify context implementation in did-utils to also contain objects #21

Closed
francis-pouatcha opened this issue Sep 1, 2023 · 5 comments · Fixed by #31
Closed

Modify context implementation in did-utils to also contain objects #21

francis-pouatcha opened this issue Sep 1, 2023 · 5 comments · Fixed by #31

Comments

@francis-pouatcha
Copy link
Member

No description provided.

@francis-pouatcha francis-pouatcha converted this from a draft issue Sep 1, 2023
@francis-pouatcha francis-pouatcha moved this from Todo to Qualified in didcomm-mediator-rs Sep 1, 2023
@francis-pouatcha
Copy link
Member Author

francis-pouatcha commented Sep 1, 2023

The current context object defined in did-utils/src/ldmodel.rs is not complete.

@francis-pouatcha
Copy link
Member Author

Example of context containing objects:

{
  "@context": [
      {"title": "https://schema.org/title"},
      "https://w3id.org/security/data-integrity/v1"
    ]
  }

Context can also have this form:

{
"@context": {"title": "https://schema.org/title"},
}

or this form:

{
  "@context": [
    {"title": "https://schema.org/title"},
    "https://w3id.org/security/data-integrity/v1"
  ]
}

@francis-pouatcha
Copy link
Member Author

Context can also be a single string:

{
  "@context": "https://w3id.org/security/data-integrity/v1"
}

@francis-pouatcha
Copy link
Member Author

This form is already supported in the current impl.

{
"@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/data-integrity/v1"
  ]
}

@francis-pouatcha
Copy link
Member Author

Also

{
  "@context": [
    {"title": "https://schema.org/title", "title2": "https://schema.org/title2"},
    "https://w3id.org/security/data-integrity/v1"
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants