Earth Engine은 공유 컴퓨팅 리소스를 보호하고 모든 사용자에게 안정적인 성능을 보장하기 위해
비상업적 할당량 등급을 도입합니다. 모든 비상업용 프로젝트는
2026년 4월 27일까지 할당량 등급을 선택해야 하며, 선택하지 않으면 커뮤니티 등급이 기본적으로 사용됩니다. 등급 할당량은 등급 선택 날짜와 관계없이
2026년 4월 27일에 모든 프로젝트에 적용됩니다.
자세히 알아보기
ee.String.encodeJSON
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
객체를 JSON으로 인코딩합니다. 프리미티브, 목록, 사전 지원
| 사용 | 반환 값 |
|---|
ee.String.encodeJSON(object) | 문자열 |
| 인수 | 유형 | 세부정보 |
|---|
object | 객체 | 인코딩할 객체입니다. |
예
코드 편집기 (JavaScript)
print('JSON-encoded ee.String',
ee.String.encodeJSON(ee.String('earth'))); // "\"earth\""
print('JSON-encoded ee.Number',
ee.String.encodeJSON(ee.Number(1))); // "1"
print('JSON-encoded ee.List',
ee.String.encodeJSON(ee.List([1, 2, 3]))); // "[1,2,3]"
print('JSON-encoded ee.Dictionary',
ee.String.encodeJSON(ee.Dictionary({lc_name: 'grassland', lc_class: 3})));
// "{\"lc_class\":3,\"lc_name\":\"grassland\"}"
Python 설정
Python API 및 geemap를 사용한 대화형 개발에 관한 자세한 내용은
Python 환경 페이지를 참고하세요.
import ee
import geemap.core as geemap
Colab (Python)
print('JSON-encoded ee.String:',
repr(ee.String.encodeJSON(ee.String('earth')).getInfo())) # '\"earth\"'
print('JSON-encoded ee.Number:',
repr(ee.String.encodeJSON(ee.Number(1)).getInfo())) # '1'
print('JSON-encoded ee.List:',
repr(ee.String.encodeJSON(ee.List([1, 2, 3])).getInfo())) # '[1,2,3]'
print('JSON-encoded ee.Dictionary:',
repr(ee.String.encodeJSON(
ee.Dictionary({'lc_name': 'grassland', 'lc_class': 3})).getInfo()))
# '{\"lc_class\":3,\"lc_name\":\"grassland\"}'
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],["The `ee.String.encodeJSON(object)` method encodes an object into a JSON string. It accepts various object types, including primitives, lists, and dictionaries, as input. The method returns a JSON string representation of the input object. Examples demonstrate encoding `ee.String`, `ee.Number`, `ee.List`, and `ee.Dictionary` types in both JavaScript and Python, showing how they are converted into their respective JSON string formats.\n"]]