Read and Parse JSON With Rust
主要讲讲 Rust 是如何处理 JSON 格式/文件的。 我的需求主要如下: 从一个远程地址下载 JSON 文件,保存到本地 读取这个 JSON 文件 对这个 JSON 文件内容进行搜索匹配 返回搜索结果 本文章的内容主要是集中讲讲第 2 步的内容。 首先需要解析 JSON 格式如下: { "0100000011D90000": { "bannerUrl": "https://img.../37fdb...f83a.jpg", "category": [ "Adventure", "RPG" ], "description": "Welcome to the Sinnoh region! ", "developer": null, "id": "0100000011D90000", "isDemo": false, "language": "en", "name": "Pok\u00e9mon\u2122 Brilliant Diamond", "nsuId": 70010000039950, "numberOfPlayers": 1, "publisher": "Nintendo", "rank": 30712, "ratingContent": [ "Mild Cartoon Violence", "Users Interact", "In-Game Purchases" ], "size": 7334789120, "version": 0 }, ....