The file extension of path is used to determine the precise type of the returned object. Supported file extension are .json, .yml, and .yaml.