Custom JSON.stringify to Classes with the toJSON method
The toJSON
method allows you to tell JSON.stringify
how to print out your Class
. This can be pretty useful…
Why Stringify Objects?
The answer for that is as usual – there are many reasons. The most obvious one is …