Structure to JSON

版本 1.0.0.0 (3.4 KB) 作者: Lior Kirsch
Saves a structure in JSON format
1.8K 次下载
更新时间 2015/5/23

查看许可证

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
}
}

引用格式

Lior Kirsch (2024). Structure to JSON (https://www.mathworks.com/matlabcentral/fileexchange/50965-structure-to-json), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2014b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 JSON Format 的更多信息
标签 添加标签
致谢

启发作品: Structure and object to JSON

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0