How to check if a json file is empty or not in matlab?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (2개)
KSSV
2018년 12월 11일
s = jsondecode('["one", "two", "three"]')
if any(cellfun(@isempty,s))
disp('empty')
else
disp('not empty')
end
댓글 수: 7
참고 항목
카테고리
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!