ee.Blob.string

Returns the contents of the blob as a String.

UsageReturns
Blob.string(encoding)String
ArgumentTypeDetails
this: blobBlob

encodingString, default: null

Examples

Code Editor (JavaScript)

// Parse a SpatioTemporal Asset Catalog (STAC) entry from Google Cloud
// Storage (GCS). This is a non-traditional use of ee.Blob.
var url = 'gs://ee-docs-demos/vector/geojson/point.json';
var blob = ee.Blob(url);
var entry = ee.Dictionary(blob.string().decodeJSON());
print(entry);  // Point (1.00, 2.00)...
print(entry.get('a_field'));  // "a demo field"