Open jtkent opened 4 years ago
Interesting. I was not aware of the @graph
property. I think it would be fairly straightforward to add a new property to the base JsonLdObject
class:
[DataMember(Name = "@type", Order = 1)]
public virtual string Type { get; }
[DataMember(Name = "@graph", Order = 2)]
public virtual Thing Graph { get; }
The only reall work will be to add some smarts to the JSON serializer to switch between using the type property or the graph property.
This library is awesome, however missing support for entity graphs is a huge drawback.
https://yoast.com/regarding-googles-related-entities-patent/
Would be willing to take a PR if you're really interested.
Any news here? Is it possible to merge enclosed MR #182 ? It would be very useful for us.
Hey @maraerben - Currently #182 is only the most surface level changes needed, I haven't yet got around to any further development for it. My last comment on the PR covers generally what I think we'd need to do for graph support but it has been a while since I've taken a deep dive at it.
I don't know when I'd be getting back to it myself so I'd definitely welcome any PRs to add graph support in the mean time.
what is the status of @graph ?
Do you have any plans to implement the @graph syntax to allow for mulitple JSON-types to be written at once.
Example: https://stackoverflow.com/questions/30505796/json-ld-schema-org-multiple-video-image-page/
This would allow for writing of only one script element rather than mulitple.