I'm hoping someone who has used a serializer and middleclass together can help me. I seem to be confused.
Tried, as a test, to serialize a middleclass class, and then deserialize it. Obviously, in the docs for binser, middleclass is a supported "custom" mapping for binser to use.
(binser URL: https://github.com/bakpakin/binser)
And yet, I can't seem to figure it out.
Basically, I made a junk test class "Testclass" with nothing but a initialize function and a "print some crap" function that printed "Yo momma!". Yep, I'm a full grown adult. Then I spawned an actual member of said class:
Code: Select all
testclass = Testclass()
Code: Select all
local class = binser.registerClass(class[, name])
Code: Select all
somevariable = binser.registerClass(testclass)
And the docs for it sort of skim over this aspect. I tried and tried, and feel I'm missing some simple step.
So, in short, can someone who has used this before point me in the right direction? How does one serialize and deserialize a middleclass class via binser? I registered the class, and then serialized it, but when deserialized, the class isn't really a class at all.
I hope that makes sense, as I'm quite tired and hope I didn't ramble on!