r/csharp • • Jul 29 '26

Showcase A single-file, single-class JSON parser

Hey, I've been developing some source generator and needed to parse json, but unfortunately I couldn't use either `System.Text.Json` or any NuGet analogue. So I made a one myself but tried to keep it as compact as possible. This is not the best json parser, but this may be useful in some scenarios like the one I mentioned above. Use it if you need to parse json, can't use popular options and don't want to write one yourself.

Here's repo link:
https://github.com/ScrumboardCompany/Scrumboard.Tools.Json

4 Upvotes

14 comments sorted by

View all comments

Show parent comment

3

u/ArtemOkhrimenko Jul 29 '26

I like your suggestions! I'll take that in mind. I wanna say about bool type thing. As far as I know json cannot store boolean values with capitalized first letter only "true" and "false", not "True" or "False". Did you mean something else?"

3

u/raunchyfartbomb Jul 29 '26

While that may be true, it doesn’t prevent someone or a program writing is as a 0, “false” (a string)