Euphoria
|
json.cc
Go to the documentation of this file.
51 const auto all_entries = string_mergers::array.merge(map<std::string>(files, [](const auto& f) { return f.name; }));
53 return fmt::format("File {} was requrested with roots: {}. All entries: {}. Did you mean {}?", p, fs->get_roots_as_string(), all_entries, closest);
66 return JsonResult::create_error({JsonErrorType::file_error, get_string_from_path_for_debugging(fs, file_name)});
146 errors.emplace_back(fmt::format("existing key {} was not read, could be {}", key, could_be(key, miss)));
JsonResult read_json_file(FileSystem *fs, const FilePath &file_name)
Definition: json.cc:58
std::string could_be(const std::string &invalid_value, const std::vector< std::string > &possible_values)
Definition: json.cc:89
std::string get_string_from_path_for_debugging(FileSystem *fs, const FilePath &p)
Definition: json.cc:21
@ parse_error
@ file_error
std::string merge(const std::vector< std::string > &strings) const
Definition: stringmerger.cc:11
Definition: vfs_path.h:36
Definition: vfs.h:74
std::optional< std::string > read_file_to_string(const FilePath &path)
Definition: vfs.cc:171
std::vector< ListedFile > list_files(const DirPath &path)
Definition: vfs.cc:127
std::optional< std::string > get_missing_errors_message()
Definition: json.cc:134
std::optional< jsonh::Value > get(const std::string &name)
Definition: json.cc:112
Definition: editdistance.search.h:14