ee.String.decodeJSON

解碼 JSON 字串。

用量傳回
String.decodeJSON()物件
引數類型詳細資料
這個:string字串要解碼的字串。

範例

程式碼編輯器 (JavaScript)

var data = ee.Dictionary(ee.String('{"a": "abc", "b": 1}').decodeJSON());
print(data);
print(data.get('a'));

Python 設定

請參閱 Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

import ee
import geemap.core as geemap

Colab (Python)

data = ee.Dictionary(ee.String('{"a": "abc", "b": 1}').decodeJSON())
print(data.getInfo())
print(data.get('a').getInfo())