Takes a file tree and outputs JSON data