Skip to content

Commit 1068731

Browse files
authored
Update 2025-03-20-tiny-allocationless-json-parser-in-c.md
1 parent 60c1600 commit 1068731

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

_posts/2025-03-20-tiny-allocationless-json-parser-in-c.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,6 @@ There were two problems with it:
116116
1. It didn't give the user control over how the memory was allocated. So you'd have to manually edit `#define` statements in `json.c`, if you wanted to increase say the maximum number of tokens that a JSON file is allowed to contain.
117117
2. Whenever `json_parse()` was called, its static arrays would be reset. This meant that calling the function a second time would overwrite the previous call's JSON result. This was fine if you didn't need to open more than one JSON file at a time, though. But even if you did, you could just manually copy around the arrays containing the JSON data.
118118

119+
## Final thoughts
120+
119121
Most of the work went into adding tons of tests to ensure it has as close to 100% coverage as possible; `tests.c` is almost as large as `json.c`! The tests also act as documentation. I've fuzzed the program with libFuzzer and documented it in [the repository](https://github.com/MyNameIsTrez/tiny-json-parser-in-c)'s README. Enjoy! 🙂

0 commit comments

Comments
 (0)