ee.Number.serialize

  • serialize() returns a string representation of a ComputedObject (like ee.Number).

  • It takes the ComputedObject instance as input and an optional legacy boolean for format control.

  • You can use serialize() to get the serialized form of an ee.Number in both JavaScript and Python.

Returns the serialized representation of this object.

UsageReturns
Number.serialize(legacy)String
ArgumentTypeDetails
this: computedobjectComputedObjectThe ComputedObject instance.
legacyBoolean, optionalEnables legacy format.

Examples

Code Editor (JavaScript)

print('Serialized representation of ee.Number', ee.Number(10).serialize());

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

import ee
import geemap.core as geemap

Colab (Python)

print('Serialized representation of ee.Number:', ee.Number(10).serialize())