In json_parse_file, if you pass in a unit that is already open, it will use it, but also close the file. It's possible the user would not want that to happen (i.e., it's a file that they have opened, and want to close in the calling routine). So, in this case, either don't close it, or give the option not to close it.