- [Instructor] You can create JSON structures
and schemas for a wide variety of data,
but when you're sharing that data with another organization
or receiving data built by someone else,
it often takes human intervention to classify the content
and decide how to integrate it.
You can make it possible to automate tasks like this
by adding semantic markup to your data.
Semantic markup not only organizes the data,
but indicates its meaning using a common vocabulary
of objects and key names.
On the web, a number of semantic systems
have been used, including RDFa and microformats.
Another popular semantic system based on JSON
is known as JSON-LD, which stands for JSON for linking data.
JSON-LD follows the rules of JSON,
but adds a couple standards
to convey the meaning of content.
First, it references common vocabularies that are maintained
by a variety of organizations, including schema.org,
productontology.org, and the W3C.
Data built on the JSON-LD standard
also implements key names based on vocabularies
that are references.
Together, these two JSON-LD features enable an application
to parse data and make decisions about what it contains
and how it should be used.
For instance, Google encourages websites
to include JSON-LD in their HTML
to provide page content summaries for search results.
JSON-LD also enables applications to examine data
from multiple sources and identify
how they relate to each other.
For instance, if I was building an application
that requested data about cars for sale
from multiple websites and displayed
a single searchable list,
I might find that the data I received
used different key names.
This could make it difficult to write code
that could reliably recognize
when two different cars for sale shared a make,
model, and year.
Is make the same as brand name, for instance?
If both of those information providers used JSON-LD,
my application would be able to recognize
that the data received is structured
based on a common standard
and it would be able to correlate values
based on their shared key names.
This can be especially helpful
when retrieving different types of data about a common item
from different sources.
For instance, if I wanted to compile information
on organizations for job seekers,
one source might provide a company's location
and number of employees while another
might give me information on the company's
diversity policy and ethics policy.
If both sources provided data structured with JSON-LD,
I would be able to recognize the company name
as a shared value between both datasets
and I could reliably compile all values together
into a single merged record.
By combining semantic meaning
with the widely used JSON data structure,
JSON-LD enables data to be combined
and used in a variety of new ways.