fix filesystem path from json

This commit is contained in:
altalk23 2024-09-13 19:33:17 +03:00
parent a42b81ae5e
commit 4ad9c848c0

View file

@ -17,7 +17,7 @@ struct matjson::Serialize<std::filesystem::path> {
return path.string();
}
static std::filesystem::path from_json(matjson::Value const& value) {
return value.as_string();
return std::filesystem::path(value.as_string()).make_preferred();
}
static bool is_json(matjson::Value const& value) {
return value.is_string();