cerialize
cerialize copied to clipboard
Allow annotated only object analysis for Serialize
Hey @weichx Plz chkout mbox lib for state management eg. https://jsfiddle.net/mweststrate/wv3yopo0/
If my object is mobx observer the Serialize fails due to
RangeError: Maximum call stack size exceeded
In debugging I found the whole object is being analysed even those properties which is not annotated to be Serialize/Deserialize.
I purpose you add an option which allow this behaviour.
Thx Jas
@weichx Btw ur lib is awesome; specially Deserializeinto
Glad you are liking the library! Happy to look at the issue, can provide a small sample of code that isn't working?
On Jan 10, 2017 11:02 AM, "Jaspreet Singh" [email protected] wrote:
Hey @weichx https://github.com/weichx Plz chkout mbox lib for state management eg. https://jsfiddle.net/mweststrate/wv3yopo0/
If my object is mobx observer the Serialize fails due to
RangeError: Maximum call stack size exceeded
In debugging I found the whole object is being analysed even those properties which is not annotated to be Serialize/Deserialize.
I purpose you add an option which allow this behaviour.
Thx Jas
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/weichx/cerialize/issues/45, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTXwfxxbv-1sKcbx8zjFLPQC1SqPZAPks5rQ1c7gaJpZM4LfOcO .
class ClassA
{
constructor(obj_b)
{
this.obj_b = obj_b // not serialized but still analysed which cause cyclic error
}
@autoserialize var1=10
}
class ClassB
{
@autoserialize var2=20
@autoserialize a_obj = new ClassA(this)
}
b_obj= new ClassB()
Serialize(b_obj)
@weichx
2 libs that implement cyclic operations :
https://github.com/erossignon/serialijse https://github.com/douglascrockford/JSON-js/blob/master/cycle.js