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

Комментарии • 14

  • @luciusrex
    @luciusrex 2 дня назад +2

    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  16 часов назад +1

      It's not off the cards. Maybe. Thanks for sticking around!

    • @luciusrex
      @luciusrex 16 часов назад

      @@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 2 дня назад +2

    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.

  • @offgridvince
    @offgridvince 2 дня назад +2

    Thinking of a new project to create to implement this... 😂😂😂

  • @m12652
    @m12652 2 дня назад +2

    Doesn't console.log already present json nicely formatted without having to stringify it...? It does in chrome.

    • @m12652
      @m12652 2 дня назад +1

      Excellent video by the way...

    • @memeflixnchill
      @memeflixnchill 2 дня назад +1

      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  16 часов назад

      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

  • @MyDpop
    @MyDpop 8 часов назад

    thanks for explaining 👍

  • @theyayaa
    @theyayaa День назад

    time to spice up next production deployment

  • @suelingsusu1339
    @suelingsusu1339 2 дня назад +1

    👌👍💪👏👏👏👏🙏🙏🙏🙏🖖🖖🖖🖖🖖🖖🌹🌹🌹🌹