Function parse_json

Source
pub fn parse_json(json: &str) -> Result<Vec<Pool>, Error>
Expand description

Parses a JSON formatted list of pools entries. Format:

[
{
 "id": 7,
 "name": "Example Pool",
 "addresses": [
   "15kDhRAcpgsugmh6mQsTcCHdvbsuYncEEV",
   "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
 ],
 "tags": [
   "/example/",
   "Example Pool"
 ],
 "link": "https://example.com"
}
]

This format is used and produced by e.g. https://github.com/bitcoin-data/mining-pools and https://github.com/bitcoin-data/mining-pools/tree/generated