> For the complete documentation index, see [llms.txt](https://learn.coremodels.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.coremodels.io/user-guides/json-schema/synchronize-json-schema.md).

# Synchronize (JSON Schema)

This guide assumes that you have already imported your schema, or at least followed the [Import (JSON Schema)](/user-guides/json-schema/import-json-schema.md) guide, and imported the sample schema.

The Merge JSON Schema feature enables users of synchronizing a model that has been changed outside CoreModels, by detecting and applying the changes in CoreModels.

***

First, open the Import UI, from the Features Tray → Channels → Import Json Schema, then select the space.

{% hint style="info" %}
If you have used a file for the import, and updated the file, you can upload the new file by going back to the 'Data Source' step then updating the data sources list.
{% endhint %}

Click on the 'Scan Files' button to go to the preview grid.

CoreModels will fetch the data source then detect and list out all the changes that has happened (1), which are necessary to synchronize the space, it will also show the number of changes categorized by their status in the stats bar (2).

you can now review the changes that has happened, and unmark the changes that you don't want to apply in CoreModels (3), you can also mark/unmark the changes based on their status (4).

<figure><img src="/files/HypwFBUiXoC4ZSln2Xo1" alt=""><figcaption><p>Preview Grid</p></figcaption></figure>

Click on Proceed to apply the changes, the UI will auto direct to the Tasks tab and show you the progress of the import process, then it will auto refresh when the merge is complete.

{% hint style="info" %}
Before any changes are applied, a backup of the model is automatically created during all import and merge processes.
{% endhint %}

***

#### JSON Schema Merge Algorithm, How does it work ?

When re-importing an external data source to a CoreModels space (destination), it uses the type name to find the matching types, once it matches the types, it starts matching child elements, then it tries to compare any remaining type or element.

It compares the source data that is parsed from the *data source*, with the stored data based on the mappings provided in the profile.

It also detects order updates that has happened to the source, both the order of the objects, and the order of the JSON array elements inside the properties.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.coremodels.io/user-guides/json-schema/synchronize-json-schema.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
