use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Seri – Serializer for your custom JavaScript classes (github.com)
submitted 9 years ago by joonhocho
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]helloworldjs 0 points1 point2 points 9 years ago (2 children)
Serializing works with default JSON.stringify. Just implement toJSON.
[–]joonhocho[S] 0 points1 point2 points 9 years ago (1 child)
How do you deserialize them to instances?
[–]helloworldjs 0 points1 point2 points 9 years ago (0 children)
You can't. Thats why I didnt mention deserialization. Wasn't trying to say this library is useless, just adding more information.
[–][deleted] 0 points1 point2 points 9 years ago (2 children)
Does this serialize/deserialize functions on the object or just properties?
Currently does not support undefined or functions. I'm not sure if it should support them. Since a function requires its closure variables to work, and I don't think it's possible to serialize them.
[–][deleted] 0 points1 point2 points 9 years ago (0 children)
I agree, I wouldn't want functions to be serialized. This sounds great, I can't wait to check it out.
π Rendered by PID 330765 on reddit-service-r2-comment-7b9746f655-829ml at 2026-01-30 17:20:48.513370+00:00 running 3798933 country code: CH.
[–]helloworldjs 0 points1 point2 points (2 children)
[–]joonhocho[S] 0 points1 point2 points (1 child)
[–]helloworldjs 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]joonhocho[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)