From 3c7a119a9a3c34169ef802d4eb0769a221b301f4 Mon Sep 17 00:00:00 2001
From: Joscha Schmiedt <joscha@schmiedt.dev>
Date: Wed, 14 Aug 2024 09:08:45 +0200
Subject: [PATCH] Fix incompatibility with newer boost::json versions

to_string method of boost::json::string_view was removed.
---
 src/caosdb/configuration.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/caosdb/configuration.cpp b/src/caosdb/configuration.cpp
index e1ffb23..6e23985 100644
--- a/src/caosdb/configuration.cpp
+++ b/src/caosdb/configuration.cpp
@@ -55,7 +55,7 @@
     throw ConfigurationError("This CaosDB client has not been configured.");                       \
   }                                                                                                \
   assert(WRAPPED_JSON_CONFIGURATION(this)->is_object());                                           \
-  const auto &configuration = WRAPPED_JSON_CONFIGURATION(this)->as_object();                       \
+  const auto &configuration = WRAPPED_JSON_CONFIGURATION(this) -> as_object();                     \
   if (!configuration.contains("connections")) {                                                    \
     throw ConfigurationError("This CaosDB client hasn't any configured connections.");             \
   }                                                                                                \
@@ -343,7 +343,7 @@ auto CreateLoggingConfiguration(const object &from) -> LoggingConfiguration {
       const auto *elem = sinks.begin();
 
       while (elem != sinks.end()) {
-        result.AddSink(CreateSinkConfiguration(elem->value().as_object(), elem->key().to_string(),
+        result.AddSink(CreateSinkConfiguration(elem->value().as_object(), std::string(elem->key()),
                                                default_level));
         elem = std::next(elem);
       }
@@ -419,7 +419,7 @@ auto ConfigurationManager::mGetDefaultConnectionName() const -> std::string {
   }
   if (connections.size() == 1) {
     // return the key of the first and only sub-element of connections.
-    return connections.begin()->key().to_string();
+    return std::string(connections.begin()->key());
   }
   throw ConfigurationError("Could not determine the default connection.");
 }
-- 
GitLab