// License: Modified MIT (NON-AI) // See the LICENSE file in the root directory for license information. // Copyright 2026 Timothy Prepscius #pragma once #include "VariantIO.hpp" namespace tjp { namespace core { namespace variant { struct VariantSerialization { typedef std::vector Block; Type_ type; Block block; VariantSerialization() {} template VariantSerialization(const Variant &v, IO &io) { auto &v_ = const_cast(v); auto io_ = io.partial(); VariantIO vio{ v_.type, v_ }; io_.object("type", v.type, "value", io_.custom(vio)); type = v.type; block = io_.partial_serialization(); } ; } ; } // namespace } // namespace } // namespace