You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is passing one jsonld ContextType into another officially supported?
I assumed it would be, but none of the examples show it and I'm having loads of problems.
I've tried a couple of ways - e.g.
just nesting another call to \JsonLd\Context::create(Foo, $data) inside the main array
creating an entirely new instance with new \JsonLd\ContextTypes\Person()
Typically, the end output will either have an empty array where the nested context should be, or what looks like raw object data: i.e. only the @type defined and a "properties" array of everything, regardless of whether a value has been supplied - so mostly a long, empty list.
I've also come across situations where the second object works, but it fails on adding a third level (you may need to nest a Person (the reviewer) inside a Review inside a Book, for example).
Thanks in advance…
The text was updated successfully, but these errors were encountered:
Is passing one jsonld ContextType into another officially supported?
I assumed it would be, but none of the examples show it and I'm having loads of problems.
I've tried a couple of ways - e.g.
\JsonLd\Context::create(Foo, $data)
inside the main arraynew \JsonLd\ContextTypes\Person()
Typically, the end output will either have an empty array where the nested context should be, or what looks like raw object data: i.e. only the
@type
defined and a "properties" array of everything, regardless of whether a value has been supplied - so mostly a long, empty list.I've also come across situations where the second object works, but it fails on adding a third level (you may need to nest a Person (the reviewer) inside a Review inside a Book, for example).
Thanks in advance…
The text was updated successfully, but these errors were encountered: