2023-10-09 12:41 PM - last edited on 2024-09-17 01:01 PM by Doreena Deng
Hehey evryone.
Id like that my user can save his work he did in my plugin into an add-on object. but my project object is quite big and im not firm enough in cpp to write for all sub-objects memmory read and write methods. so i had the idea that i just serialize my object and save the json or xml string into the add-on object. unfortunately in cpp serialization is also a difficult topic.. but did someone do this before and can share some tipps and tricks?
i see that we have in the AddOnCommandTest example some sort of JSON deserialization and in the goodies example there is a small xml serializer and deserializer.
im happy about any kind of suggestions or tipps!
Solved! Go to Solution.
2023-10-13 06:47 AM
Hi Joel!
Maybe the example called CommunicationClient_Test would be a good start. It uses the class ObjectState to do the serialization (in general). It uses the functionalities provided by ObjectStateJSONConversion.hpp.
And if you need more examples for that, you can also check out:
I also suspect that going from ObjectState <-> JSON to ObjectState <-> Binary later would be an option, since there are already functions for this as well.
Hope that helps,
Bernd
2023-10-13 06:47 AM
Hi Joel!
Maybe the example called CommunicationClient_Test would be a good start. It uses the class ObjectState to do the serialization (in general). It uses the functionalities provided by ObjectStateJSONConversion.hpp.
And if you need more examples for that, you can also check out:
I also suspect that going from ObjectState <-> JSON to ObjectState <-> Binary later would be an option, since there are already functions for this as well.
Hope that helps,
Bernd
2023-10-13 09:24 AM
Very Cool! Thank you very much!