W3C home > Mailing lists > Public > public-linked-json@w3.org > October 2014

RE: How does JSON-LD relate to JSON Schema?

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Mon, 6 Oct 2014 17:12:27 +0200
To: <public-linked-json@w3.org>
Message-ID: <066401cfe177$f1ba25e0$d52e71a0$@gmx.net>
Hi Simon,

On Monday, October 06, 2014 3:20 PM, Simon Heimler wrote:
> I've worked with JSON Schema for a while and am wondering how it
> relates to JSON-LD.

This has already been discussed several times... have you had a look at the mailing list archives [1]? Here's one thread that might answer all your questions:

  http://lists.w3.org/Archives/Public/public-linked-json/2013Aug/0046.html


> Of course JSON-LD is about semantics and having URI's to identify
> things. JSON Schema is more about describing a data format in general
> - similar to XML-Schema. (JSON Schema could be use to describe JSON-
> LD).

Yep, have a look at this

  https://github.com/json-ld/json-ld.org/pull/334


>  I think both are good for auto-generating API's, Documentation
> and making data more machine readable etc.
> 
> But I'm not completely sure how both relate to eachother. Can JSON-LD
> be used to substitute JSON Schema? What are your opinions on that?

They serve different purposes. The short version is: JSON-LD give JSON messages a well-defined meaning by mapping most things to IRIs. JSON Schema describes the syntactic structure of a JSON document. Both work with JSON so you can use them together.


HTH,
Markus


[1] http://lists.w3.org/Archives/Public/public-linked-json/


--
Markus Lanthaler
@markuslanthaler
Received on Monday, 6 October 2014 15:13:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:18:42 UTC