-
Notifications
You must be signed in to change notification settings - Fork 39
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
Recursive loop when ID is the same as URL #29
Comments
This looks like it's a bug in the underlying JSON-LD library. |
@Dolondro Sorry I didn't have the time to test the issue and reply yet. But yes, it looks like this is very likely — micrometa basically wraps around the JSON-LD parser, adds some functionality and unifies the output across the different formats. As soon as I find some time I'll try to further look into this ... |
Hiya, thanks for getting back to me. It looks like the issue is in I'll write a test case and submit it as a Issue with them, but it looks suspiciously like they may have ceased bothering with the project :( |
@Dolondro You might be right, unfortunately. AFAIK it's mostly one guy who wrote it, and I read a statement somewhere a while ago that he doesn't plan to put a lot more effort into it. And AFAIR there was one other library doing basically the same thing but had a comparably ugly API / was harder to work with ... Please let me know if you're lucky with your issue or find a viable alternative. Thanks! |
Bug report for the underlying issue can be found here: lanthaler/JsonLD#87 |
@jkphl https://github.com/digitalbazaar/php-json-ld is the other library you were referring to? |
@rvanlaak Exactly! Unfortunately, there's no news on the upstream error (lanthaler/JsonLD#87) and the API of When I decided to build on an external JSON-LD parser I briefly looked into rolling my own, but JSON-LD parsing is far from being trivial, so I decided to focus on what's more important for me (JSON-LD was never a high priority thing for me ...) |
Isn't this just a matter of implementation? If an entity wants to reference itself, or have a child reference the parent, it can do so. Any var dumper will have to solve this problem. That is, what lanthaler/JsonLD returns is correct, you just have to be careful when you start looping through it not to end up in an endless loop. |
Example code:
If url is changed to omit the final backslash, it works fine. I'm assuming this is related to issue #27. I'm attempting to put together a PR to fix it but I'm ending up a little lost, any advice you can give as to what the most likely cause would be appreciated.
The text was updated successfully, but these errors were encountered: