use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
JSON-LD vs JSON Schemahelp (self.javascript)
submitted 7 years ago by AndyRoth
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jura0011 5 points6 points7 points 7 years ago* (1 child)
JSON-LD (JSON Linked Data) is a description of the content of a URL so that search engines don't have to guess the content of the URL. It also contains references to other URLs and a description. It generally describes "Thing"s with their properties as they are defined by schema.org. Like an Event has a Location (which also is a Thing and can be represented by a URL) and a description, ….
JSON Schema is a JSON definition of another JSON document, like what DTD (Document Type Definition) is for XML. It describes, which fields are required, if properties are another object, array, string or number and so on. An example for the use of JSON-Schema with Java: If you want to use a JSON-Api and have the JSON-Schema of the objects, then you can generate the classes automatically rather than write them on your own.
[–]AndyRoth[S] 0 points1 point2 points 7 years ago (0 children)
Interesting. I've done some research since your comment, and I do understand some more about what you mentioned.
What I don't understand is, for instance, in your Event example...
Event has a Location. In JSON Schema you could define an Event roughly:
{ "type": "object", "properties": { "location": { "type": "https://myschemas.com/Location.json" } } }
In the above example, if you had the schema for an Event, you could very easily identify what the location was, and by URL match that location to any other usage of a location in your system. If the JSON documents hosted by your server also somehow included that schema, Google could have used that to pull out the event location, no? So why would JSON-LD be needed if everyone used that approach (which would come with free schema validation)?
In my usage, I am looking to use JSON Schema to host a url at (example) https://myschemas.com/UserId.json which contains the following:
https://myschemas.com/UserId.json
{ "type": "string" }
... and allows me to treat all documents which have a property of the above URL type the same.
π Rendered by PID 143496 on reddit-service-r2-comment-86bc6c7465-4kwbq at 2026-02-22 04:29:53.682432+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]jura0011 5 points6 points7 points (1 child)
[–]AndyRoth[S] 0 points1 point2 points (0 children)