How to check if a json file is empty or not in matlab?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am reading the json file using jsondecode function.
i need to check if the json file is empty or not. If empty, display error message.
0 Commenti
Risposte (2)
KSSV
il 11 Dic 2018
s = jsondecode('["one", "two", "three"]')
if any(cellfun(@isempty,s))
disp('empty')
else
disp('not empty')
end
7 Commenti
Vedere anche
Categorie
Scopri di più su JSON Format in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!