4 ms·
I have to commend on the simplicity and clarity of thought in the write up. I could see what you were up to just by a skim through it (also thanks for the ready
by InfinityByTen 2y ago
I have to commend on the simplicity and clarity of thought in the write up. I could see what you were up to just by a skim through it (also thanks for the ready reference)!
I'm pretty sure you'd already know of this, but once you've written your own version, it might help to compare and take notes from a popular, well-established, benchmarked library: https://github.com/serde-rs/json https://github.com/serde-rs/json.
- abound 2y agoAnd on a related note, this project was for educational purposes, but if the author wants to do more parsing in Rust, there's the excellent `nom` crate [1], which provides a JSON parser as an example [2]. It uses a very similar paradigm to what the author used in the article, and provides a lot of helper utilities. I used it to parse a (very, very small) subset of Markdown recently [3] and enjoyed the experience. [1] https://github.com/rust-bakery/nom https://github.com/rust-bakery/nom [2] https://github.com/rust-bakery/nom/blob/main/examples/json.rs https://github.com/rust-bakery/nom/blob/main/examples/json.r... [3] https://git.sr.ht/~bsprague/logseq-to-linkwarden https://git.sr.ht/~bsprague/logseq-to-linkwarden