if ls returned json then it would have to decide what to do with non-utf8 filenames (or even users and groups, I do not know what the rules are there); it could reture either "filename.txt" or {"encoding":"base64", "data":"<base64 blob>"} to obviate the problem but it is not a very elegant solution