Open uyu34 opened 4 years ago
So for anyone else using this Object Deliverer who has the same issue... I solved it by writing custom JSON serialization for each class with nested objects. In the serialization of the parent object when we get to a nested object we call its serialization as well. If that object also has nested objects we can call them within the first nested object's serialization. Once all the serialization is done we can send the JSON as a string over the network with TCP and when it's received reconstruct by writing your own logic that converts JSON back into the classtype.
If you use this approach be careful with circular references, as you will likely create an infinite loop.
There may be a better approach to solving this problem that already exists in the system that I am not aware of.
Hello,
Thank you for making this plugin, it is doing a lot of great things.
However, I am having an issue with the JSON data I am sending and receiving with a custom class. This custom class contains some Arrays of other custom classes which also contain arrays of other custom classes. When I print the JSON as a string or to the log, the data doesn't look like the intended format and instead it almost appears as each element in the array is just a file.
Would love if you can provide some feedback on this. I have included a screenshot of the output.
Please let me know if you need a better explaination.