Open shiretu opened 1 month ago
More info:
using subscribed = std::variant<subscribed_v4_orderbook, subscribed_v4_subaccounts>;
template <> struct glz::meta<subscribed> {
static constexpr std::string_view tag = "channel";
static constexpr auto ids = std::array{"v4_orderbook", "v4_subaccounts"};
};
using ws_message_type = std::variant<connected, subscribed, channel_data>;
template <> struct glz::meta<ws_message_type> {
static constexpr std::string_view tag = "type";
static constexpr auto ids = std::array{"connected", "subscribed", "channel_data"};
};
that work properly now: it switches on type
and then on channel
created this PR: https://github.com/stephenberry/glaze/pull/1098 which also includes fixes for issue https://github.com/stephenberry/glaze/issues/1096
Hi all,
Here is a patch that allows us to support variant of variant, each having tagged keys: