mpackage.json
Note
This page documents schemaVersion
1.1.0
for the package definition file mpackage.json
,
which was released as part of MATLAB® R2025a. mpackage.json
schema are both forward and
backwards compatible. This means that package definition files of any
schemaVersion
can be used in any MATLAB release since R2024b. However, packages with schema released later than the
version of MATLAB that you are using may have some features disabled.
For additional information on schema versions and corresponding MATLAB releases, see schemaVersion.
When you create a package with the MATLAB package manager, a package definition file gets created to save metadata such as
the package name, version, member folders, or dependencies. The package definition file is a
JSON file called mpackage.json
and is stored in the
resources
folder located in the root folder of the package.
You can edit the package definition file directly to change the metadata. Alternatively,
you can change the metadata by setting properties of the matlab.mpm.Package
object corresponding to the package.
The package definition file has a form such as:
{ "name": "SampleToolbox", "version": "2.0.1", "id": "af92112b-8b66-44d1-b4b1-848f54affa3e",+ "displayName": "My Sample Toolkit", "summary": "My summary goes here.", "description": "My description goes here.", "provider": { "name": "John Doe", "organization": "The Mathworks, Inc.", "email": "jdoe@mathworks.com", "url": "mathworks.com" }, "folders": [ { "path": "functions", "languages": [ "matlab" ] } ], "dependencies": [ { "name": "CornersPkg", "compatibleVersions": ">1.0.0", "id": "e6c4123e-0068-42be-aef2-00d49d1509f5" } ], "releaseCompatibility": ">R2025a", "schemaVersion": "1.1.0" }
Properties
Tips
In order for MATLAB to detect changes to
mpackage.json
, the package must be in editable mode. For additional information, see Create and Manage Packages.