There's Way More to JSON.Stringify Than You Think
HTML-код
- Опубликовано: 18 сен 2024
- Let's have a look at the hidden gems found in JSON.Stringify - there's more than you think. And it's not just indentation.
For your reference, check this out:
developer.mozi...
🏫 My Udemy Courses - www.udemy.com/...
🎨 Download my VS Code theme - marketplace.vi...
🐦 Find me on Twitter - / dcodeyt
💸 Support me on Patreon - / dcode
📰 Follow me on DEV Community - dev.to/dcodeyt
📹 Join this channel to get access to perks - / @dcode-software
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
#dcode #javascript
Dom I've been following you since you started! Love your work! I'd love it if you were to do a javascript crash course for those learning typescript! And even more than that, videos on typescript? Thank you for what you do!!
It's not off the cards. Maybe. Thanks for sticking around!
@@dcode-software thank you!! I'll still watch your videos but I keep trying to get your tips to work with ts (once I tried typed programming, C#, its so hard to go back to vanilla js - started to learn js with your videos actually!). These days, I make my apps in both c# (cli and winforms) and now very recently, ts + electron, would love to use your videos as reference for my projects!
Edit: typescipt is pretty popular anyhow, I'm sure there's an audience for it!
I think I am gonna stick to usual filter() function for filtering the data and use null as second argument.
That way, if any other developer would look at my code, they might not get confused.
Agree 👍
Thinking of a new project to create to implement this... 😂😂😂
Doesn't console.log already present json nicely formatted without having to stringify it...? It does in chrome.
Excellent video by the way...
Not the strigified JSON, because then, its not JSON object anymore. It is a string.
He is doing console log, just to demonstrate the output for us.
Also, in real Live projects, we don't usually use stringify for console logging, we use it to send API response or store the JSON content in a file.
Although we use stringify for console logging, if our program is modifying the JSON variable on the go, then normal console log won't show previous version of JSON, it only shows most current version of that JSON variable, in that case, we use stringify to console log to see all version of JSON variable.
Yeah but we want to use JSON stringify so we can send the data to other things like API calls/local storage etc.
Not using it purely to log to the console
thanks for explaining 👍
time to spice up next production deployment
😂
👌👍💪👏👏👏👏🙏🙏🙏🙏🖖🖖🖖🖖🖖🖖🌹🌹🌹🌹