We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be convenient for getters and or attributes to be serializable via #toJSON or JSON.stringify
#toJSON
JSON.stringify
cont Thing = attributes({ name: String })( class Thing { get wild() { return 'wild thing' } get name() { return `Thing { ${this.get('name')} }` } } )
Currently #toJSON would return an empty object, same with JSON.stringify
Could one or both of the getter or attribute be added to the sterilization results?
The text was updated successfully, but these errors were encountered:
Hello, @t3h2mas. I'm not sure what you mean, running your example able like this:
const Thing = attributes({ name: String, })( class Thing { get wild() { return 'wild thing'; } get name() { return `Thing { ${this.get('name')} }`; } } ); const thing = new Thing({ name: 'abc' }); console.log(thing.toJSON());
it shows { name: 'Thing { abc }' } for me.
{ name: 'Thing { abc }' }
Sorry, something went wrong.
I must have been using v1 or messed up my trial code.
Non-issue, sorry for the confusion.
No branches or pull requests
It would be convenient for getters and or attributes to be serializable via
#toJSON
orJSON.stringify
Currently #toJSON would return an empty object, same with
JSON.stringify
Could one or both of the getter or attribute be added to the sterilization results?
The text was updated successfully, but these errors were encountered: