Import & Export

SchemaStudio can read existing schemas and data files so you don't have to rebuild from scratch, and it can export your work in the formats your toolchain expects.

IMPORT EXPORT JSON Schema .json · Draft-07 XML Schema (XSD) .xsd JSON Data pre-populate records XML Data pre-populate records SchemaStudio project saved as .ssproj JSON Schema .json · Draft-07 XML Schema (XSD) .xsd JSON Data all records · array XML Data all records · elements Schema format Data format

Import

Importing a JSON Schema

  1. Go to File → Import → JSON Schema…
  2. Browse to your .json schema file and click Open.
  3. SchemaStudio parses the schema and creates a new structure tab populated with the fields, types, and constraints defined in the file.
  4. Review the imported structure and adjust any properties that couldn't be inferred automatically.
Supported draft: Import supports JSON Schema Draft-07 and Draft-2019-09. Keywords from later drafts are accepted but may be ignored if they don't map to a SchemaStudio field property.

Importing an XML Schema (XSD)

  1. Go to File → Import → XML Schema (XSD)…
  2. Browse to your .xsd file and click Open.
  3. SchemaStudio creates a structure tab from the root element definition.
  4. Complex types defined in the XSD are imported as nested objects or helper structures depending on whether they are referenced from multiple locations.

Importing a data file

You can import a JSON or XML data file to pre-populate Data Entry Mode records. This is useful when you already have data files and want to use SchemaStudio for further editing or to generate a schema from the data's shape.

  1. Go to File → Import → JSON Data… or Import → XML Data…
  2. Browse to your data file and click Open.
  3. If a schema is already open, SchemaStudio maps incoming fields to the existing structure. Fields in the file that don't match an existing field are flagged in the Issues panel.
  4. If no schema is open, SchemaStudio infers a schema from the data's structure and creates both the structure and the records in one step.
Deduplication: When importing data into an existing project, records that match an existing record (same values in all fields) are skipped by default. A summary shows how many records were imported and how many were skipped as duplicates.

Export

Exporting a JSON Schema

  1. Go to Export → Export as JSON Schema…
  2. Choose a save location and filename. The default filename matches the structure tab name.
  3. SchemaStudio writes a Draft-07 compatible .json schema file.

Helper structures referenced from the main structure are inlined in the output under $defs and referenced with $ref. Alternatively, enable Flatten all references in the export dialog to inline them directly at the point of use.

The example below shows a condensed excerpt from a real JSON Schema export — a game level database with three top-level modes, each containing a structured level object.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "unevaluatedProperties": false,
  "properties": {
    "story_mode": {
      "title": "Story Mode",
      "description": "The collection of levels for the story mode.",
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name": {
            "title": "In game level name",
            "description": "The level name used in the game as an identifier.",
            "type": "string"
          },
          "properties": {
            "title": "Level Properties",
            "description": "The various properties needed to build the level.",
            "type": "object",
            "required": ["title", "element_group", "width", "height", "max_score", "piece_value", "counter_value", "bonus_runs"],
            "properties": {
              "title": {
                "title": "Level Display Title",
                "description": "The title of the level that is displayed in game.",
                "default": "[Level Title]",
                "type": "string"
              },
              "width": {
                "title": "Board Width",
                "description": "The number of columns displayed in the game for the level",
                "type": "integer",
                "minimum": 6,
                "maximum": 9,
                "multipleOf": 1,
                "default": 6
              },
              "height": {
                "title": "Board Height",
                "description": "The number of rows displayed in the game for the level",
                "type": "integer",
                "minimum": 6,
                "maximum": 10,
                "multipleOf": 1,
                "default": 6
              },
              "is_moves": {
                "title": "Level Counts Moves",
                "description": "Set to true if this level counts moves before it ends, or false if it is time based.",
                "type": "boolean"
              },
              "goal_options": {
                "title": "Level Goals To Complete",
                "description": "The lists of goals the player needs to complete in order to finish the level.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "goal_type": {
                      "title": "Game Piece to Collect",
                      "description": "The in game identifier for the piece that must be destroyed to complete the level.",
                      "type": "string",
                      "examples": ["HYDROGEN", "CARBON"]
                    },
                    "max_value": {
                      "title": "Goal Count",
                      "description": "The minimum required pieces to destroy in order to complete the game.",
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "multipleOf": 1
                    }
                  }
                }
              },
              "empty_spaces": {
                "title": "Coordinates of Empty Spaces",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "x": { "title": "X Coordinate", "type": "integer", "minimum": 0, "exclusiveMaximum": 9, "multipleOf": 1 },
                    "y": { "title": "Y Coordinate", "type": "integer", "minimum": 0, "exclusiveMaximum": 10, "multipleOf": 1 }
                  }
                }
              }
            }
          }
        }
      }
    },
    "casual_mode": { "title": "Casual Mode", "description": "...", "type": "array" },
    "challenge_mode": { "title": "Challenge Level", "description": "...", "type": "object" }
  }
}

Exporting an XML Schema (XSD)

  1. Go to Export → Export as XML Schema (XSD)…
  2. Choose a save location and click Save.
  3. SchemaStudio writes a .xsd file with the structure as the root element type.

Exporting data as JSON

  1. Make sure all records are saved (unsaved changes to the current record are not exported).
  2. Go to Export → Export Data as JSON…
  3. Choose a save location and click Save.
  4. SchemaStudio writes a JSON file containing all records as an array of objects.

If you want to export only certain records, use Filter Fields to narrow the visible records before exporting. The export dialog offers an option to export only the currently filtered records or all records.

Exporting data as XML

  1. Go to Export → Export Data as XML…
  2. Choose a save location. The export dialog prompts for a root element name to wrap the record array.
  3. Click Save. Each record becomes a child element of the root.

Project files

Project files (.ssproj) are the primary save format and are not intended for use outside of SchemaStudio. They bundle the schema, data records, and changelog into a single package file. To share your schema or data with other tools, use one of the export formats above.