我在戈朗的json解析中遇到了问题。我使用了一些代码将json解析为map[string]interface{}{},但是当我试图迭代嵌套字段时,会触发错误(type interface {} does not support indexing我想得到以下信息:
遍历每个response->blogs,然后获取放置在response->posts->blog_n->photos->original_size中的original_size
一年多以前,Go向Offset类型添加了一个json.UnmarshalTypeError值(有关上下文,请参见闭包 )。偏移值背后的目的是有意义的,但我不确定如何在读取io.ReadCloser类型的go http响应体时使用它。Go type. Value string // description of JSON<