请教gojson 解析多json组

eaglezzb · · 934 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

"github.com/widuu/gojson" 需要解析的json是如下格式 : 主要是想取得properties 里面字段的值,求思路 //c10 := gojson.Json(json1).Getindex(3).Getindex(1).Getindex(1).Get("src").Tostring() 这个APi参数看了半天没懂!!!!! [ { "content": null, "deleted": false, "metadata": null, "name": "Spapp20180116101712", "properties": { "appendBlobCommittedBlockCount": null, "blobTier": null, "blobTierChangeTime": null, "blobTierInferred": false, "blobType": "PageBlob", "contentLength": 136367309312, "contentRange": null, "contentSettings": { "cacheControl": null, "contentDisposition": null, "contentEncoding": null, "contentLanguage": null, "contentMd5": "d51vZtE02c9nshI8TMCzMg==", "contentType": "application/octet-stream" }, "copy": { "completionTime": null, "id": null, "progress": null, "source": null, "status": null, "statusDescription": null }, "deletedTime": null, "etag": "0x8D562DCC9199713", "lastModified": "2018-01-24T03:44:34+00:00", "lease": { "duration": "infinite", "state": "leased", "status": "locked" }, "pageBlobSequenceNumber": null, "remainingRetentionDays": null, "sequenceNumber": 5, "serverEncrypted": false }, "snapshot": null }, { "content": null, "deleted": false, "metadata": null, "name": "oracle-c65o10g-2017-12-24-10-17-27-541-0", "properties": { "appendBlobCommittedBlockCount": null, "blobTier": null, "blobTierChangeTime": null, "blobTierInferred": false, "blobType": "PageBlob", "contentLength": 32212255232, "contentRange": null, "contentSettings": { "cacheControl": null, "contentDisposition": null, "contentEncoding": null, "contentLanguage": null, "contentMd5": "nwidyVR2BIMrOy8odGM2zA==", "contentType": "application/octet-stream" }, "copy": { "completionTime": null, "id": null, "progress": null, "source": null, "status": null, "statusDescription": null }, "deletedTime": null, "etag": "0x8D55C871C51C207", "lastModified": "2018-01-16T02:16:10+00:00", "lease": { "duration": null, "state": "available", "status": "unlocked" }, "pageBlobSequenceNumber": null, "remainingRetentionDays": null, "sequenceNumber": 15, "serverEncrypted": true }, "snapshot": null }, { "content": null, "deleted": false, "metadata": null, "name": "oracleg20180103175200", "properties": { "appendBlobCommittedBlockCount": null, "blobTier": null, "blobTierChangeTime": null, "blobTierInferred": false, "blobType": "PageBlob", "contentLength": 136367309312, "contentRange": null, "contentSettings": { "cacheControl": null, "contentDisposition": null, "contentEncoding": null, "contentLanguage": null, "contentMd5": "uXRqWg3vEhrQVqDfFg6nIg==", "contentType": "application/octet-stream" }, "copy": { "completionTime": null, "id": null, "progress": null, "source": null, "status": null, "statusDescription": null }, "deletedTime": null, "etag": "0x8D562DCCA4CAF7F", "lastModified": "2018-01-24T03:44:36+00:00", "lease": { "duration": "infinite", "state": "leased", "status": "locked" }, "pageBlobSequenceNumber": null, "remainingRetentionDays": null, "sequenceNumber": 14, "serverEncrypted": false }, "snapshot": null }, { "content": null, "deleted": false, "metadata": null, "name": "windowshare20171226153514", "properties": { "appendBlobCommittedBlockCount": null, "blobTier": null, "blobTierChangeTime": null, "blobTierInferred": false, "blobType": "PageBlob", "contentLength": 136367309312, "contentRange": null, "contentSettings": { "cacheControl": null, "contentDisposition": null, "contentEncoding": null, "contentLanguage": null, "contentMd5": "uXRqWg3vEhrQVqDfFg6nIg==", "contentType": "application/octet-stream" }, "copy": { "completionTime": null, "id": null, "progress": null, "source": null, "status": null, "statusDescription": null }, "deletedTime": null, "etag": "0x8D54C33B1430833", "lastModified": "2017-12-26T07:38:44+00:00", "lease": { "duration": null, "state": "available", "status": "unlocked" }, "pageBlobSequenceNumber": null, "remainingRetentionDays": null, "sequenceNumber": 1, "serverEncrypted": false }, "snapshot": null } ]

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

934 次点击  
加入收藏 微博
2 回复  |  直到 2018-03-08 17:56:51
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传