Choose between JSON or TOML based on a file name
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename |
logical function name_is_json(filename) character(*), intent(in) :: filename character(*), parameter :: json_identifier = ".json" name_is_json = .false. if (len_trim(filename)<len(json_identifier)) return name_is_json = str_ends_with(lower(filename),json_identifier) end function name_is_json