因此,正如评论者所建议的,您可以使用“encoding/json”的流 API 一次读取一个字符串:r := ... // get some io.Reader (e.g. open the big array file)d := json.NewDecoder(r)// read "["d.Token()// read strings one by onefor d.More() { s, _ := d.Token() // do something with s which is the newly read string fmt.Printf("read %q\n", s)}// (optionally) read "]"d.Token()请注意,为简单起见,我省略了需要实现的错误处理。