i use return -1 :)) because this check func is used in other func and and i get numbers for diff errors, and other things
/// This if statement isn't needed
if (typeof file !== "object" || file == undefined || file == null) return -1;
I thought it was a problem for that file and that's why I was getting an error at loadAsObject,
but your version is a working method ... with loadAsString , and after parseAsJson,
THANK YOU