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

"expansionMap" not supported #108

Open
ZababurinSergei opened this issue Oct 1, 2023 · 1 comment
Open

"expansionMap" not supported #108

ZababurinSergei opened this issue Oct 1, 2023 · 1 comment

Comments

@ZababurinSergei
Copy link

ZababurinSergei commented Oct 1, 2023

I wanted to use the library.
But when I connected it as a module I got an error.
Here's the part of the code that doesn't work and get one error

details: "\"expansionMap\" not supported."
type:"jsonld.OptionsError"
  const unmappedProperties = [];

    const expansionMap = info => {
      if (info) {
        if (info.activeProperty) {
          unmappedProperties.push(
            `${info.activeProperty}.${info.unmappedProperty}`
          );
        } else if (info.unmappedProperty) {
          unmappedProperties.push(info.unmappedProperty);
        }
      }
    };


    
    // Remove all keys not present in the jsonld context
    const expanded = await jsonld.expand(jsonldDoc, {
      documentLoader,
      expansionMap,
    });

How can i fix this problem ?

@gjgd
Copy link
Owner

gjgd commented Oct 1, 2023

Hi! I don't maintain this lib anymore but happy to help debug this. Can you provide a code example to repro the error?

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

No branches or pull requests

2 participants