If you're about to write a client library for a json API, be sure to check out https://app.quicktype.io/
It can generate (de)serialization code for a bunch of languages, including some of my favorites like #crystallang and #rust! Just give it a json-schema or an example json, and you're good to go!