Skip to content
New issue

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

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

Already on GitHub? # to your account

Add properties to include into toJSON() #10425

Open
loangodard opened this issue Jan 31, 2025 · 4 comments
Open

Add properties to include into toJSON() #10425

loangodard opened this issue Jan 31, 2025 · 4 comments

Comments

@loangodard
Copy link

Please add propertiesToInclude into toJSON parameters since it is calling toObject which include this param

@SupremeDeity
Copy link

saw this yesterday, for some reason toJSON does not have the include array, and its docstring says otherwise. All the other similar methods like toDatalessJSON do have that include array parameter.

@asturur
Copy link
Member

asturur commented Feb 14, 2025

I think docs have been updated. TJSON is a delegate from javascript and has its own signature.
Can you point me to the incorrect docs so i can update them?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

Image

There is a customProperties static field now that you can use to carry over things in json automatically

@SupremeDeity
Copy link

@asturur for example here the docstring's example:

@asturur
Copy link
Member

asturur commented Feb 14, 2025

yes is definetely wrong. i think only the object one has been correctly corrected

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

No branches or pull requests

3 participants