---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# JSON - 범위 지정됨

# JSON - 범위 지정됨 {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 1분

JSON 스크립트 포함은 문자열에서 JSON 객체를 만들고 JSON 객체를 문자열로 변환하는 범위가 지정된 메서드를 제공합니다.

범위가 지정된 애플리케이션의 경우 JSON API는 JavaScript ES5 네이티브 JSON 객체를 호출하는 정적 메서드를 사용합니다.  
주:  
범위가 지정된 스크립트(예: 전역)에서 JSON 메서드 호출과 함께 전역 키워드를 사용합니다 `. JSON.stringify()`를 사용합니다. 전역 키워드를 사용하지 않으면 ScopedRhinoObjectWrapper: 래핑 가능한 유형이 아님: com.glide.script.FieldGlideDescriptor와 같은 오류 메시지가 발생할 수 있습니다.

## 범위가 지정된 JSON - parse(String str) {#ariaid-title2}

JSON 형식의 문자열에서 객체 또는 원시 유형을 작성합니다.
{#JSONScoped-parse_S__table_zys_3tr_rdb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| 문자열 | 문자열 | JSON 형식의 문자열입니다. |
[표 1. 매개변수]

{#JSONScoped-parse_S__table_zys_3tr_rdb} {#JSONScoped-parse_S__table_azs_3tr_rdb__entry__2}

| 유형 | 설명 |
|-|-|
| 객체 | 지정된 문자열에서 생성된 객체입니다. |
[표 2. 반환]

{#JSONScoped-parse_S__table_azs_3tr_rdb}  

    var str = '{"name":"George","lastname":"Washington"}';
    var obj = global.JSON.parse(str);
    gs.info('The first name is ' + obj.name);

출력:

    The first name is George

## 범위가 지정된 JSON - stringify(Object jsonObject) {#ariaid-title3}

JSON 객체에서 문자열을 작성합니다.
{#JSONScoped-stringify_O__table_g3q_w5r_rdb__entry__3}

| 이름 | 유형 | 설명 |
|-|-|-|
| jsonObject | 객체 | 문자열로 변환할 JSON 객체. |
[표 3. 매개변수]

{#JSONScoped-stringify_O__table_g3q_w5r_rdb} {#JSONScoped-stringify_O__table_h3q_w5r_rdb__entry__2}

| 유형 | 설명 |
|-|-|
| 문자열 | JSON 형식의 문자열입니다. |
[표 4. 반환]

{#JSONScoped-stringify_O__table_h3q_w5r_rdb}  

    var obj = {"name":"George","lastname":"Washington"};
    var str =  global.JSON.stringify(obj);
    gs.info('The object ' + str);

출력:

    The object {"name":"George","lastname":"Washington"}


