Export (JSON-LD)

In this guide you will see how to create a JSON-LD profile manually, or simply just how to export your imported schema.

If you are following the tutorial from Dynamic Import (JSON-LD) you can skip to Step 2: Use the profile to export your schema


Before starting, let's assume that you have already created some nodes, and you already added some mixins and relations, we will assume that you have used a mixin to store a title, and a description for your nodes.

Step 1: Create the import/export profile

  1. From the features tray, click on 'Grids' โ†’ click on the plus icon.

  2. Select 'JSON-LD Import/Export Profile' as the Grid Type, and add an appropriate name. The profile UI will automatically open up.

  3. On the bottom left corner, Click on 'Add Key'

  4. Add the Key name that will show up in the exported file (for example: title)

    1. The 'title' card will show up, with the 'Transformed To' set to None.

    2. Set 'Transformed To' to 'Mixin', then set 'Transfomration Value' to the mixin that has the value of the title.

    3. Set the 'Export Format' to 'String', and (optionally) set the 'Default Value' to 'Default title'

    4. Click 'Save'

  5. Repeat the process for the assumed 'Description' field, and for any other mixins or relations that you are using in your model

    1. Note that Relations are usually exported as 'Object Array' - this is set in the 'Export Format' field.

Now that the profile is set, let's see how to use it.


Step 2: Use the profile to export your schema

  1. Navigate to the 'Types Grid', In the 'Types Grid' tab and on the far right, you'll find the sidebar tab, click on 'export', which will expand the export menu, then select 'Custom JSON-LD'.

    1. Alternatively you can open the dedicated export UI, Features Tray โ†’ Channels โ†’ Export โ†’ Custom JSON-LD

  2. Select 'Types', 'Elements' at the 'Export Includes' dropdown.

  3. Select the profile you created (or that was created automatically during the import) at the 'Import Configuration' dropdown, let's leave the default values for the other options.

  4. Click on 'Process', then after the export is done, you can either download the file or click on 'Preview' to see the export results

Now that you have exported your schema using the default options, let's explore what the other options mean.

Export Options

Include HTML <script>:

Includes an HTML element with a type attribute set to "application/ld+json" in the downloaded export file, this is usefull when copying directly into your webpage.

Include All Relations:

By Default, CoreModels filters the export results based on the selected space, setting this option to true, will include the relations that exist in the current space, regardless if its target existed in the current space or not.

Include Space:

Check this box to include the space as a JSON-LD property in each object, the property will be named as 'CoreModels_Space'

Graph Based:

See more at graph based JSON-LD, Setting this option to true, will export all the selected nodes in '@graph' array.

While setting this option to false will require a 'root' node to exist for the exporter to begin with.

Use Default @type:

Check this box to use a default value for the '@type' key, defaults are: 'rdfs:class' for types, 'rdf:property' for elements, read more at JSON-LD @type property

Last updated