You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Saves the values in the structure 'data' to a file using JSON format.
Example:
data.name = 'chair';
data.color = 'pink';
data.metrics.height = 0.3;
data.metrics.width = 1.3;
saveJSONfile(data, 'out.json');
Output 'out.json':
{
"name" : "chair",
"color" : "pink",
"metrics" : {
"height" : 0.3,
"width" : 1.3
}
}
Cite As
Lior Kirsch (2026). Structure to JSON (https://in.mathworks.com/matlabcentral/fileexchange/50965-structure-to-json), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: Structure and object to JSON
General Information
- Version 1.0.0.0 (3.42 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
