50#ifndef snicholls_core_adapters_nlohmann_secret_json_hpp
51#define snicholls_core_adapters_nlohmann_secret_json_hpp
57#include <snicholls/core/secret.hpp>
68void from_json(
const nlohmann::json& j, secret<T>& s)
73 }
catch (
const nlohmann::json::exception&) {
75 std::string what(
"snicholls::secret from_json: the value does not convert to the secret's type (got ");
76 what += j.type_name();
80 s = secret<T>(std::move(value));
void from_json(const nlohmann::json &j, decimal &d)
Reads canonical decimal text from a JSON string.
snicholls::json_error and the nlohmann/json adapter layer: shared by every adapter.
A JSON value that does not convert to or from a core type.