There's Way More to JSON.Stringify Than You Think

  Рет қаралды 2,114

dcode

dcode

Күн бұрын

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

Пікірлер: 15
@luciusrex
@luciusrex 3 күн бұрын
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!!
@dcode-software
@dcode-software Күн бұрын
It's not off the cards. Maybe. Thanks for sticking around!
@luciusrex
@luciusrex Күн бұрын
@@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!
@memeflixnchill
@memeflixnchill 3 күн бұрын
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.
@dcode-software
@dcode-software Күн бұрын
Agree 👍
@offgridvince
@offgridvince 3 күн бұрын
Thinking of a new project to create to implement this... 😂😂😂
@MyDpop
@MyDpop Күн бұрын
thanks for explaining 👍
@thedelanyo
@thedelanyo 13 сағат бұрын
I think JSON.stringify should allow for compression, and parse should uncompress all by providing a fourth argument
@m12652
@m12652 3 күн бұрын
Doesn't console.log already present json nicely formatted without having to stringify it...? It does in chrome.
@m12652
@m12652 3 күн бұрын
Excellent video by the way...
@memeflixnchill
@memeflixnchill 3 күн бұрын
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.
@dcode-software
@dcode-software Күн бұрын
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
@theyayaa
@theyayaa 2 күн бұрын
time to spice up next production deployment
@dcode-software
@dcode-software Күн бұрын
😂
@suelingsusu1339
@suelingsusu1339 3 күн бұрын
👌👍💪👏👏👏👏🙏🙏🙏🙏🖖🖖🖖🖖🖖🖖🌹🌹🌹🌹
Signals And Array Mutability In Angular 18
2:11
Ben Nadel
Рет қаралды 39
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,7 МЛН
Brawl Stars Edit😈📕
00:15
Kan Andrey
Рет қаралды 47 МЛН
Vanilla JavaScript routing - Trying to escape JavaScript frameworks
3:51
Nikos Tech Downtime
Рет қаралды 3,4 М.
Array Slice vs. Splice in JavaScript: A HUGE DIFFERENCE
9:50
@property Is One Of The Coolest New CSS Features
10:41
Web Dev Simplified
Рет қаралды 21 М.
I gave three AI models a CSS quiz
50:31
Kevin Powell
Рет қаралды 9 М.
We stopped using serverless. The results are insane.
18:27
Theo - t3․gg
Рет қаралды 94 М.
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,7 МЛН