variant type
navono opened this issue · 2 comments
navono commented
Hi.
I have a dynamic type field in json, I simply declare it with std::any
type, but it cannot be compiled.
Is this possible or not?
eao197 commented
Hi!
json_dto is C++14 library and the only C++17 (or newer) type supported is std::optional
. It means that json_dto doesn't support std::variant
nor std::any
.
At the moment we have no plans to upgrade json_dto to C++17. But you can add support for std::any
by using any method of defining user IO for json_dto: see here for examples.
navono commented
Thank you for response. I'll check that.