Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow annotated only object analysis for Serialize #45

Open
JasCodes opened this issue Jan 10, 2017 · 4 comments
Open

Allow annotated only object analysis for Serialize #45

JasCodes opened this issue Jan 10, 2017 · 4 comments

Comments

@JasCodes
Copy link

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

@JasCodes
Copy link
Author

@weichx
Btw ur lib is awesome; specially Deserializeinto

@weichx
Copy link
Owner

weichx commented Jan 10, 2017 via email

@JasCodes
Copy link
Author

JasCodes commented Jan 10, 2017

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

@nicodmf
Copy link

nicodmf commented Mar 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants