We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 315d086 commit 73d86efCopy full SHA for 73d86ef
1 file changed
include/vix/json/Simple.hpp
@@ -766,6 +766,26 @@ namespace vix::json
766
return def;
767
}
768
769
+ std::string get_string_or(std::string_view key) const
770
+ {
771
+ return get_string_or(key, std::string{});
772
+ }
773
+
774
+ std::int64_t get_i64_or(std::string_view key) const noexcept
775
776
+ return get_i64_or(key, 0);
777
778
779
+ double get_f64_or(std::string_view key) const noexcept
780
781
+ return get_f64_or(key, 0.0);
782
783
784
+ bool get_bool_or(std::string_view key) const noexcept
785
786
+ return get_bool_or(key, false);
787
788
789
// Typed setters
790
791
void set_string(std::string_view key, std::string v) { set(key, token(std::move(v))); }
0 commit comments