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

?expand/Resource (expand any internal reference by ID) #235

Open
cubap opened this issue Jan 31, 2022 · 0 comments
Open

?expand/Resource (expand any internal reference by ID) #235

cubap opened this issue Jan 31, 2022 · 0 comments
Assignees

Comments

@cubap
Copy link
Member

cubap commented Jan 31, 2022

{  "label": "Sample Data",
   "@type": "ItemList",
   "forCollection": {
       "value": "Sample Collection"
    },
   "date": 123093091209,
   "seeAlso": {
      "@id": "https://example.com/42",
      "label": { "en": "external resource", "none":"externalatio"},
   },
   "ItemListElement" : [
      {
          "@id": "http://store.rerum.io/v1/id/39339",
          "name": "Sample List Item"
      }, 
      "http://store.rerum.io/v1/id/2322"
   ]
   "__rerum": { ... }
}

Becomes...

{  "label": "Sample Data",
   "@type": "ItemList",
   "forCollection": {
       "value": "Sample Collection"
    },
   "date": 123093091209,
   "seeAlso": {
      "@id": "https://example.com/42", //external, no change
      "label": { "en": "external resource", "none":"externalatio"},
   },
   "ItemListElement" : [ // expanded
      {
          "@id": "http://store.rerum.io/v1/id/39339",
          "name": "Sample List Item",
          "@type": "Potato",
          "value": 11
      }, 
      {
          "@id": "http://store.rerum.io/v1/id/2322",
          "name": "Sample List Item",
          "@type": "Hamsteak",
          "value": "Eleventy"
      }
   ]
   "__rerum": { ... }
}
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