|
|
|
|
|
by remram
2107 days ago
|
|
As a non-LD person, I've been very disappointed by the JSON-LD stuff when I tried to use it recently. I thought the point was to be able to "enrich" your API by adding a context and not changing your JSON responses, but in practice: * There is no way to update your context without breaking your JSON-LD-aware consumers (one term in your JSON can't link to two IRIs, so you can have it expand to the new term or the old one, not both) * There is no way to "expand" values to IRIs, the context only does it for keys, so if your JSON contains `{"personRole": "manager"}` you can 't expand it to `{"http://myschema.org/personRole": "http://myschema.org/manager"}`, you actually need that second IRI in your JSON Really it's a great way to represent linked data, but there were plenty of options already. I wish it bridged the gap with JSON APIs instead of merely looking like JSON. |
|
I agree that there probably is no value in using JSON-LD for an application that was built without LD in mind.
Regarding your last statement about APIs. JSON API (https://jsonapi.org/) looks interesting. Have you worked with that?