6 #ifndef METALLAL_JSON_VALUE_TO_HPP
7 #define METALLAL_JSON_VALUE_TO_HPP
15 namespace bj = boost::json;
18 template <
typename allocator_type>
20 bj::value *out_bj_value) {
22 *out_bj_value = input_value.
as_bool();
24 *out_bj_value = input_value.
as_int64();
30 *out_bj_value = input_value.
as_string().c_str();
33 for (
const auto &elem : input_value.
as_array()) {
34 bj_array.emplace_back(mj::value_to<bj::value>(elem));
36 *out_bj_value = bj_array;
39 for (
const auto &elem : input_value.
as_object()) {
40 bj_object[elem.key().data()] = mj::value_to<bj::value>(elem.value());
42 *out_bj_value = bj_object;
43 }
else if (input_value.
is_null()) {
44 out_bj_value->emplace_null();
48 template <
typename allocator_type>
71 template <
typename T,
typename allocator_type>