How to convert MATLAB Scripts to JSON ?
5 ビュー (過去 30 日間)
古いコメントを表示
How to convert MATLAB Scripts to JSON ?
0 件のコメント
回答 (1 件)
Jan
2018 年 5 月 19 日
The question is not meaningful: While a Matlab script contains executable code, a JSON file is though to store data. Of course you could create a JSON file, which contains the text of the M-file as string, but this is rather trivial. See jsonencode:
Str = fileread(FileName);
JSONStr = jsonencode(Str);
For a simple string this is enclosing the string in double quotes.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で JSON Format についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!