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
Invalid JSON-LD syntax; @context must be an object. #296
Comments
This is the JSON ld in question:
|
Hey, thanks for the report. I thought this was a bug at first, but I'm not sure based on the information here. Further down on the page you referenced:
And you can confirm other AP platforms like Mastodon produce similar JSON-LD. I'm sure we could clean up the extra |
Friendica is compacting the JSON-LD input before processing. This compacting is done via a JSON-LD library (and it only works when the JSON-LD itself is valid). This also means that we are more picky like other projects, but this compacting makes the parsing easier for us. I still have to have a deeper look at this issue. But when I found out that it isn't an issue on our side, it would be great if you could apply some changes on some development machine and that I could check it from our side, just to make sure that everything is okay. |
I just had a look at the outboxes of other projects. Mastodon for example isn't providing a |
Yep, just removed those fields on outboxes on our test instance. If you need to create an account for testing there, here's an invite link. Let me know if that fixes the issue, or if we need to make any other changes. |
The outbox looks fine now. And I just signed up and got the most beautiful error message I ever got:
|
Haha, whoops! Needed to mess with the database. That should be fixed now if you want to try again. |
@annando Just to confirm, did that outbox change fix everything on Friendica's end? |
I guess so, but I will perform some tests with the test account. |
Sounds good. Just merged the fix in #299, so if everything looks good on your end we can close this. |
I can confirm that this fixes it for me. Should we close this issue or do you want to perform some further testing @annando? |
@wiwie when it works for you, it's great. I want to do several communication tests. |
I'll close this for now, since we seemed to have fixed this particular issue. But if anything comes up in your testing @annando please feel free to open a new issue, or continue the discussion here! |
When following my writefreely user chris@blog.cwiwie.org from friendica chris@friendica.cwiwie.org I get the following error response upon writing new posts / updating posts in writefreely:
2020/04/10 22:51:59 Response: JsonLdException: [jsonld.SyntaxError]: Invalid JSON-LD syntax; @context must be an object.
From the json-ld spec it also seems that the context is supposed to be an object or a link to a jsonld file: https://www.w3.org/TR/2020/CR-json-ld11-20200316/#the-context
The text was updated successfully, but these errors were encountered: