Parsing JSON in Rust easily explained

Parsing JSON in a proper way requires representing the JSON data in a structured format so that the language can find out which fields have to be parsed and which type they are. The Rust way of representing the structured data are so called structs . We could make appropriate structs manually, but thanks to the great online converter, transform.tools , we can generate the structs very easily. In this article we will parse data from songsterr.com , a web site with guitar tabs. Let’s make the request to their API. Just click here and look at the data in your browser. Scarry? Not really, just copy all data and paste here at the left hand side box. Rust structs should appear on the right side almost immediately. ...

2021-10-20 · 7 min · Boban Acimovic