Closed keanine closed 2 years ago
Yes, I have deliberatly not made any T * typehandler since I think the ovnership is confusing. You can make one yourself quite easily.
There is a typehandler for std::unique_ptr that will new if the struct is nullptr, so std::vector<std::unique_ptr
Ah ok that makes sense. I need to get into the habit of using more smart pointers really so this solution should work fine for me, thank you!
I love json_struct so far by the way, it's so simple to use out of the box thanks to the macros I wish I had found it sooner!
Awesome! Please don't hesitate giving feedback, and spread the word 😄
How do I setup a member std::vector<MyStruct*> for serialization and deserialization? If I make it a vector of values rather than pointers it works fine.