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 API 和如何使用 geemap 进行交互式开发,请参阅 Python 环境页面。

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())