-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Labels
Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Area-SettingsIssues related to settings and customizability, for console or terminalIssues related to settings and customizability, for console or terminalIssue-TaskIt's a feature request, but it doesn't really need a major design.It's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.The new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.Fix is checked in, but it might be 3-4 weeks until a release.
Milestone
Description
In #2515 I started adding some really useful JsonUtils that let us get a property from a json object if it exists.
Unfortunately, I made them like this:
void GetOptionalColor(const Json::Value& json,
std::string_view key,
std::optional<uint32_t>& target);
void GetOptionalString(const Json::Value& json,
std::string_view key,
std::optional<std::wstring>& target);
void GetOptionalGuid(const Json::Value& json,
std::string_view key,
std::optional<GUID>& target);
void GetOptionalDouble(const Json::Value& json,
std::string_view key,They really should have all been template specializations of GetOptionalValue, but I didn't want to burn a day trying to fight compiler errors.
Furthermore, we should probably also just have JsonUtils::GetValue<typename T>() that does the same thing, but w/o the optional<T>'s.
Metadata
Metadata
Assignees
Labels
Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Area-SettingsIssues related to settings and customizability, for console or terminalIssues related to settings and customizability, for console or terminalIssue-TaskIt's a feature request, but it doesn't really need a major design.It's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.The new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.Fix is checked in, but it might be 3-4 weeks until a release.