|
|
|
|
|
by pseudoramble
3306 days ago
|
|
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. |
|
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.