Encode and decode structs with the encoding/json stdlib.
Make an HTTP GET with net/http and read the body.
Atomically write bytes to disk with os.WriteFile.
Read an entire file into memory with os.ReadFile.