Added functionality to read jsons when given a file descriptor