Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

asymmetric serialization/deserialization of object with custom toJSON function #7

Open
simonnagl opened this issue Sep 21, 2017 · 0 comments
Labels

Comments

@simonnagl
Copy link
Member

Serializing an object with a custom toJSON function returns the object AS IS. When it get's stringified toJSON is used which converts the object to a string.

Deserializing creates a new object of another type then the orginal object, with or without stringification. This needs to be resolved somehow.

One solution could be to not use toJSON but serialize the object as is without it's methods. This suggestion is not approved to work yet.

@simonnagl simonnagl added the bug label Sep 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant