From the course: JSON Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Map a data structure with JSON-LD - JavaScript Tutorial
From the course: JSON Essential Training
Map a data structure with JSON-LD
- [Instructor] Sometimes it's not realistic to change the key names in JSON data that you want to share. For instance, if you want to simply provide data from a large database you maintain, and you already use a set of key names that are different from those in the public context and type that you want to use. For this situation, JSON-LD supports a different type of structure. Instead of renaming your keys, you can include an additional object within your JSON-LD snippet that maps your key names to the key names used in the context and type that your snippet references. I'm going to try this out with the company overview for h+ Sport. I have snippet.json open, which is the data that I want to convert to JSON-LD format. And so I'm going to select that and copy it to the clipboard. And then over in my snippet.jsonld file, I'll paste that in. And now I need to convert my content to use JSON-LD standards. So I…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
What is JSON-LD?2m 46s
-
(Locked)
Implement predefined key names5m 33s
-
(Locked)
Map a data structure with JSON-LD3m 43s
-
(Locked)
Work with JSON-LD generators4m 40s
-
(Locked)
Add a JSON-LD snippet to a web page2m 46s
-
(Locked)
Challenge: Structure data with JSON-LD1m 8s
-
(Locked)
Solution: Structure data with JSON-LD6m 5s
-
(Locked)
-