| 1 |
Description: Always use system nlohmann::json in headers |
| 2 |
While setting DPP_USE_EXTERNAL_JSON works to build D++, anything using |
| 3 |
it needs to also define it, otherwise it will try to use the bundled |
| 4 |
nlohmann::json which has been removed from the source. This patch will |
| 5 |
force the headers to always use the system's nlohmann::json. |
| 6 |
Author: Ben Westover <[email protected]> |
| 7 |
Bug: https://github.com/brainboxdotcc/DPP/issues/1458 |
| 8 |
Last-Update: 2025-07-01 |
| 9 |
|
| 10 |
--- a/include/dpp/json.h |
| 11 |
+++ b/include/dpp/json.h |
| 12 |
@@ -19,11 +19,7 @@ |
| 13 |
* limitations under the License. |
| 14 |
* |
| 15 |
************************************************************************************/ |
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
+#include <nlohmann/json.hpp> |
| 22 |
|
| 23 |
namespace dpp { |
| 24 |
|
| 25 |
--- a/include/dpp/json_fwd.h |
| 26 |
+++ b/include/dpp/json_fwd.h |
| 27 |
@@ -19,11 +19,7 @@ |
| 28 |
* limitations under the License. |
| 29 |
* |
| 30 |
************************************************************************************/ |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
+#include <nlohmann/json_fwd.hpp> |
| 37 |
|
| 38 |
namespace dpp { |
| 39 |
|