How to convert MATLAB Scripts to JSON ?
조회 수: 10 (최근 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!