From 895972365e11346bf9cfcab1e73b882366f5b9bb Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Sat, 21 Sep 2019 21:56:03 -0400 Subject: Access Settings Values as Json. --- settings.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'settings.cpp') diff --git a/settings.cpp b/settings.cpp index 46119905..62d928e1 100644 --- a/settings.cpp +++ b/settings.cpp @@ -249,7 +249,7 @@ template<> vector Settings::Get>(const string& key, Ref view, BNSettingsScope* scope) { - char* tmpStr = BNSettingsGetJsonString(m_object, key.c_str(), view ? view->GetObject() : nullptr, scope); + char* tmpStr = BNSettingsGetJson(m_object, key.c_str(), view ? view->GetObject() : nullptr, scope); string result(tmpStr); BNFreeString(tmpStr); return result; @@ -311,3 +311,9 @@ bool Settings::Set(const string& key, const vector& value, Ref view, BNSettingsScope scope) +{ + return BNSettingsSetJson(m_object, view ? view->GetObject() : nullptr, scope, key.c_str(), value.c_str()); +} -- cgit v1.3.1