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

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…

Contents