Python Standard Library: JSON

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ม.ค. 2025

ความคิดเห็น • 9

  • @JakeCallahan
    @JakeCallahan  ปีที่แล้ว +1

    What are some ways that you've used JSON in Python?
    Have you used the CLI tool I showed in the last section of the video?

  • @DiptonilRoy
    @DiptonilRoy 10 หลายเดือนก่อน

    The last technique is genius! No matter how easy or accessible the topic is, every time I watch your video - I always go out learning something new.

  • @dragonkat13
    @dragonkat13 ปีที่แล้ว +1

    What a great video! I don't know how you don't have more views. It's a crime!

  • @duke007x3
    @duke007x3 11 หลายเดือนก่อน

    really great explanation! Thank You, Jake!

  • @DiptonilRoy
    @DiptonilRoy 10 หลายเดือนก่อน

    By the way, I do not know if you have ever covered it or not, but I would love to see your technique of designing and implementing custom exceptions for a general application (that is fairly complex and huge). How do you handle their respective logs? How do you decide what information to expose to the clients using the application as logs (may be in the terminal or a separate log file) and what to send to a more dev-centric log file (if any)? How do you tackle exceptions arising due to another exception in logs? Also, (this is more opinionated, I suppose) do you find the use of things like Liskov's Substitutions within Exceptions reasonable (and why)?

    • @JakeCallahan
      @JakeCallahan  10 หลายเดือนก่อน +1

      These are all great questions, most of which are answered in one of my pet projects at work: github.com/SatelliteQE/broker.
      In that project, you can find the custom exceptions I use and how logging is handled when in different log levels. Another interesting thing I've introduced with this is an "Emitter" class that can be used for a more structured log-like file that can be more easily consumed in CI environments.
      github.com/SatelliteQE/broker/blob/master/broker/helpers.py#L269
      Now regarding LSP, I'm not very strict when it comes to adhering to most paradigms, if the situation you're in requires some kind of deviation. With that said, my exception subclasses are typically very lightweight.

    • @DiptonilRoy
      @DiptonilRoy 10 หลายเดือนก่อน

      @@JakeCallahan Sounds interesting! Thanks for the recommendation!

  • @Diablo-qp3iz
    @Diablo-qp3iz ปีที่แล้ว

    Is it better if using orjson ?

    • @JakeCallahan
      @JakeCallahan  ปีที่แล้ว

      I've not had a need to use that library, but it does look interesting. If your environment allows third party libraries, that looks like a good alternative.
      I'll add it to my list for a future series on great packages from PyPi, thanks!