How to convert MATLAB Scripts to JSON ?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to convert MATLAB Scripts to JSON ?
0 Kommentare
Antworten (1)
Jan
am 19 Mai 2018
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 Kommentare
Siehe auch
Kategorien
Mehr zu JSON Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!