Re:JSON-LD and Why I Hate the Semantic Web
by pseudoramble on Saturday June 03, 2017 @10:27AM
(#14476511)
A similar thought crossed my mind too. I've never used JSON-LD. I'm not quite sure where I would use it. One of the ideas was what you said.
The other idea I had is that it may help with transforming payloads from their serialized format into a static type system like TypeScript. It could be nice to have a system that can see an incoming response, validate the type using JSON-LD, and construct an instance of that object with it. It can be done without JSON-LD, but it may be useful.
Re:JSON-LD and Why I Hate the Semantic Web
by moonforeshot on Sunday June 04, 2017 @03:19AM
(#14480262)
...or FB can create a 'sdk-code-generation' like they did with Thrift, along with typescript generation.
Also, your idea is possible with current Typescript 2.3's language-server specs :)
But, this is quite separate from 'generic-machine understandable' data - which is what json-ld is all about.
graphql can be designed to incorporate most of json-ld specs (and hydra too)...
Then everyone can benefit because it's machine-friendly-annotated data everywhere :)