Generate a json representation of a file tree with file information