Json Parser from Scratch in C# using TDD

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ • 16

  • @moke_codes
    @moke_codes Рік тому +3

    Love this kind of video. We can get a glimpse of how other devs think. It's very interesting to see where we think alike, where we don't. I learn a lot with it.

  • @jamesmussett
    @jamesmussett Рік тому +15

    I’d like to see you tackle performance optimisations and add some benchmarks, for the viewers benefit more then anything.
    I had to implement one that was quite cut down feature wise that had zero heap allocations. It was for 100Hz message logging which is well beyond what the average developer would need.
    It’s shocking how many allocations even the optimised Utf8JsonWriter does under the hood, let alone in the standard JsonSerializer.

    • @RawCoding
      @RawCoding  Рік тому +2

      can do! I think the over all point for MS team is to make the parser safe rather than fast.

    • @jamesmussett
      @jamesmussett Рік тому +1

      @@RawCoding absolutely, there’s a lot of features that you inherently can’t have without a certain amount of allocations, so I understand the reasoning.
      Unfortunately it just wasn’t suitable for my use case.

  • @TheInkSpoots
    @TheInkSpoots Рік тому +1

    Loved the video, looking forward to seeing more

  • @nove1398
    @nove1398 Рік тому +1

    Looking forward to seeing a formatted version, this gave me some ideas though. Nice sharing!

  • @DurgeshMarrathe
    @DurgeshMarrathe 3 місяці тому

    What exactly you craete for this,
    this is which one is console app and which one is class library can you please tell me how can i create json parser
    where i pass my model for the json and i get back that values

  • @natha8560
    @natha8560 Рік тому +1

    Hi there, I reaaaaally hope you see this comment because I do have a quick question: Do you consider this approach as fast as using something like IronPython and deserializing and flattening the files using Python scripts? I'm thinking of passing streams to the parser but was wondering how efficient it would be to go character by character for longer jsons. Thanks for the amazing insight and video! Also if you would like to get in touch I can also provide a CSV parser in exchange for some info, maybe you would like to make a video out of something similar

    • @RawCoding
      @RawCoding  Рік тому +1

      Hey there, I don’t quite understand your question. If you want to parse a json document I think using the built in JsonDocument is best, this is a mental exercise

    • @natha8560
      @natha8560 Рік тому +1

      @@RawCoding So instead of parsing a json document from memory, I want to parse it in the form of a memory stream and then read each character from the stream rather than the json itself. I was just wondering if the parser is efficient speed wise when it comes to large jsons let's say 8-9 mb of data. I'm also watching the Functional approach now, ty for the help!

    • @RawCoding
      @RawCoding  Рік тому

      Best use an out of the box parser otherwise you’ll need to build something your self, that parser in this video is probably pretty bad perf

  • @abuzeromohammed3386
    @abuzeromohammed3386 Рік тому +1

    What about talking about active directory logins

  • @7th_CAV_Trooper
    @7th_CAV_Trooper 11 місяців тому

    At 7 minutes in I am thinking your bool test will pass if you pass "test", "tree", "trap", etc.. I'm curious to see if you fix that by the end of the video. I usually write unit tests for sad path first.

  • @maxymstoiakevych4139
    @maxymstoiakevych4139 Рік тому +1

    A WHAT?

  • @ahjsbkdjhavkcjhvac
    @ahjsbkdjhavkcjhvac Рік тому

    first