It would be cool if some of this functionality could be available as a library, and work with serde-json