func TestDownloadJson(t *testing.T) { var req *request.Request req = request.NewRequest("http://live.sina.com.cn/zt/api/l/get/finance/globalnews1/index.htm?format=json&id=23521&pagesize=4&dire=f&dpc=1", "json") var dl downloader.Downloader dl = downloader.NewHttpDownloader() var p *page.Page p = dl.Download(req) var jsonMap interface{} jsonMap = p.GetJsonMap() fmt.Printf("%v", jsonMap) //fmt.Println(doc) //body := p.GetBodyStr() //fmt.Println(body) }