How to check if a json file is empty or not in matlab?

3 views (last 30 days)
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.

Answers (2)

madhan ravi
madhan ravi on 11 Dec 2018

KSSV
KSSV on 11 Dec 2018
s = jsondecode('["one", "two", "three"]')
if any(cellfun(@isempty,s))
disp('empty')
else
disp('not empty')
end
  7 Comments

Sign in to comment.

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!