[Interop-dev] Network Device JSON Schema
André Gaul
(spam-protected)
Mon Nov 3 09:40:08 CET 2014
Hey friends!
Am 03.11.2014 um 08:56 schrieb Nicolás Echániz:
> When discussing LibreMap with André (is he a member of this group?) we
> tried to define the most basic schema for node mapping and make any
> other information optional (through plugins that populate the JSON).
Yep, I'm here! :)
I chime in with Mitar's idea to use JSON-LD but maybe there's a bit of
confusion due to the used terminology.
* JSON schema [1] is a way to specify data types in your JSON objects,
i.e., for validation purposes. For example: the field 'geolocation'
is required, is of type 'object' and has required fields 'lat' and
'lon' which are of type 'number'.
* JSON-LD [2] is a way to specify a 'context', i.e., the context
provides semantics for a set of fields in a JSON object. For example:
the field 'geolocation' is a 'http://schema.org/GeoCoordinates'.
Now the confusion comes in: schema.org doesn't provide JSON schemas but
JSON-LD contexts. :)
I vote for defining JSON-LD contexts for our networks. Once the contexts
are available, you simply add a few fields like '@context' and '@type'
to the JSON that your API delivers. This approach provides more
flexibility for the numerous projects but still allows to understand
data from others. We can still agree on the same JSON schema additionally.
What do you think?
Cheers from Berlin,
André
[1] http://json-schema.org/
[2] http://json-ld.org/
--
Homepage http://andre.gaul.io
GitHub https://github.com/andrenarchy
Twitter https://twitter.com/#!/andrenarchy
Diaspora https://diasp.org/u/andrenarchy
(you won't find me on facebook!)
Jabber (spam-protected)
PGP Key 0x0FA9170E
More information about the Interop-dev
mailing list