ee.Dictionary.serialize

Trả về biểu thị được tuần tự hoá của đối tượng này.

Cách sử dụngGiá trị trả về
Dictionary.serialize(legacy)Chuỗi
Đối sốLoạiThông tin chi tiết
this: computedobjectComputedObjectĐối tượng ComputedObject.
legacyBoolean, không bắt buộcBật định dạng cũ.

Ví dụ

Trình soạn thảo mã (JavaScript)

// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
  B1: 182,
  B2: 219,
  B3: 443
});

print('Serialized representation of ee.Dictionary', dict.serialize());

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.

import ee
import geemap.core as geemap

Colab (Python)

# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
    'B1': 182,
    'B2': 219,
    'B3': 443
})

print('Serialized representation of ee.Dictionary:', dic.serialize(), sep='\n')