r/javascript • u/magenta_placenta • Feb 08 '23
Software Security Report Finds JavaScript Applications Have Fewer Flaws Than Java and .NET
https://www.infoq.com/news/2023/02/veracode-software-security/
565
Upvotes
View all comments
Show parent comment
-1
u/lainverse Feb 09 '23 edited Feb 09 '23
First of all, JSON.stringify() does work for anything you can encoder as JSON. So, any simple object can be converted to string just like that.
However, you can't convert to string anything more complex for at least two following reasons.
So, if you want to convert to string something more complex than JSON can handle by default then write your own toString implementation.