How to check if a json file is empty or not in matlab?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (2)
KSSV
le 11 Déc 2018
s = jsondecode('["one", "two", "three"]')
if any(cellfun(@isempty,s))
disp('empty')
else
disp('not empty')
end
7 commentaires
Voir également
Catégories
En savoir plus sur JSON Format dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!