Add binary type support to all binary file formats, as well as an internally represented binary type

This commit is contained in:
Michael Reilly committed 2020-04-14 10:22:45 -04:00
1 parent 6121fc52cf
commit 012c9665ac
21 files changed
+3008 -106

No files matched your search

@@ -67,6 +67,28 @@ struct external_constructor<value_t::string>
}
};
template<>
struct external_constructor<value_t::binary>
{
template<typename BasicJsonType>
static void construct(BasicJsonType& j, const typename BasicJsonType::binary_t& b)
{
j.m_type = value_t::binary;
typename BasicJsonType::internal_binary_t value{b};
j.m_value = value;
j.assert_invariant();
}
template<typename BasicJsonType>
static void construct(BasicJsonType& j, typename BasicJsonType::binary_t&& b)
{
j.m_type = value_t::binary;
typename BasicJsonType::internal_binary_t value{std::move(b)};
j.m_value = value;
j.assert_invariant();
}
};
template<>
struct external_constructor<value_t::number_float>
{