1.0.1 • Published 7 years ago
em-serializer v1.0.1
Serializer
securely serializes a particular class of objects.
these objects keep their methods.
Usage
1. construct a serializer object
mySerializer = new Serializer<MyClass>(new MyClass());note: for the time being, it is required to include a prototype object as constructor parameter
2. serialize Objects
myObjectString : string = mySerializer.serialize(myObject : MyClass)3. deserialize Objects
myNewObject : MyClass = mySerializer.deserialize(myObjectString : string)4. use myNewObject as you would myObject;
Assuming MyClass has the method .myMethod(), you can now call myNewObject.myMethod() and expect the same results.
Limitations
You cannot transmit lambdas.