|
|
|
|
|
by ComputerGuru
760 days ago
|
|
> All that said, serde_json is incredibly convenient and giving up to write your own parser is a big hammer for a problem that probably doesn't need it. I had a thought in my reply [0] on this that actually might let him eat his cake and have it too in this regard. I think you can heavily abuse serde::de::Visitor to schema validate without actually parsing (or with less parsing, at any rate). I went into more detail in my comment but I wanted to ping you (@duped). [0]: https://news.ycombinator.com/item?id=40357159 |
|
Or, use sonic_rs::LazyValue if you want to parse json on demand as you traverse it.