idea is to use std::variant in place of unions. Thing is, that forces a change on the client side as well.