JSON 객체 형식

  • 릴리스 버전: Washingtondc
  • 업데이트 날짜 2024년 02월 01일
  • 읽기7분
  • JSON 객체는 두 개의 구조로 빌드됩니다.

    • 이름/값 쌍의 컬렉션입니다. 다양한 언어에서 이것은 객체, 레코드, 구조체, 딕셔너리, 해시 테이블, 키 목록 또는 연관 배열로 실현됩니다.
    • 정렬된 값 목록입니다. 대부분의 언어에서 이것은 배열, 벡터, 목록 또는 시퀀스로 실현됩니다.
    가장 간단한 형태의 JSON 객체는 쉼표로 구분된 이름/값 쌍 집합일 뿐입니다. 예:
    {"name one":"value one","name two":"value two"}
    다음은 JSON의 단일 인시던트 기록 배열 샘플입니다.
    {"records":
      [{"closed_by":"",
        "__status": "success",
        "category":"inquiry",
        "escalation":"0",
        "state":"1",
        "location":"",
        "reassignment_count":"0",
        "time_worked":"",
        "order":"0",
        "due_date":"",
        "number":"INC0010180",
        "upon_approval":"proceed",
        "sla_due":"2010-03-04 22:51:49",
        "follow_up":"",
        "notify":"1",
        "business_stc":"0",
        "caused_by":"",
        "rejection_goto":"",
        "assignment_group":"d625dccec0a8016700a222a0f7900d06",
        "incident_state":"1",
        "opened_at":"2010-02-23 22:51:49",
        "wf_activity":"",
        "calendar_duration":"",
        "group_list":"",
        "caller_id":"",
        "comments":"",
        "priority":"3",
        "sys_id":"fd0774860a0a0b380061bab9094733ad",
        "sys_updated_by":"itil",
        "variables":"",
        "delivery_task":"",
        "sys_updated_on":"2010-02-23 22:51:49",
        "parent":"",
        "active":"true",
        "opened_by":"681b365ec0a80164000fb0b05854a0cd",
        "expected_start":"",
        "sys_meta":"System meta data",
        "watch_list":"",
        "company":"",
        "upon_reject":"cancel",
        "work_notes":"",
        "sys_created_by":"itil",
        "cmdb_ci":"",
        "approval_set":"",
        "user_input":"",
        "sys_created_on":"2010-02-23 22:51:49",
        "contact_type":"phone",
        "rfc":"",
        "approval_history":"",
        "activity_due":"",
        "severity":"3",
        "subcategory":"",
        "work_end":"",
        "closed_at":"",
        "close_notes":"",
        "variable_pool":"",
        "business_duration":"",
        "knowledge":"false",
        "approval":"not requested",
        "sys_mod_count":"0",
        "problem_id":"",
        "calendar_stc":"0",
        "work_start":"",
        "sys_domain":"global",
        "sys_response_variables":"",
        "correlation_id":"",
        "sys_class_name":"incident",
        "short_description":"this was inserted with python",
        "impact":"1",
        "description":"",
        "correlation_display":"",
        "urgency":"3",
        "assigned_to":"",
        "made_sla":"true",
        "delivery_plan":""}
      ]
    }
    다음은 오류가 발생한 인시던트 응답의 기록 배열입니다.
    {
        "records": [
            {
                "__error": {
                    "message": "Invalid Insert into: incident",
                    "reason": "Data Policy Exception:  Short description is mandatory "
                },
                "__status": "failure",
                "active": "true",
                "activity_due": "",
                "approval": "not requested",
                "approval_history": "",
                "approval_set": "",
                "assigned_to": "",
                "assignment_group": "d625dccec0a8016700a222a0f7900d06",
                "business_duration": "",
                "business_stc": "",
                "calendar_duration": "",
                "calendar_stc": "",
                "caller_id": "",
                "category": "inquiry",
                "caused_by": "",
                "child_incidents": "0",
                "close_code": "",
                "close_notes": "",
                "closed_at": "",
                "closed_by": "",
                "cmdb_ci": "",
                "comments": "",
                "comments_and_work_notes": "",
                "company": "",
                "contact_type": "phone",
                "correlation_display": "",
                "correlation_id": "",
                "delivery_plan": "",
                "delivery_task": "",
                "description": "",
                "due_date": "",
                "escalation": "0",
                "expected_start": "",
                "follow_up": "",
                "group_list": "",
                "impact": "3",
                "incident_state": "1",
                "knowledge": "false",
                "location": "",
                "made_sla": "true",
                "notify": "1",
                "number": "INC0010001",
                "opened_at": "2013-07-23 18:01:17",
                "opened_by": "6816f79cc0a8016401c5a33be04be441",
                "order": "",
                "parent": "",
                "parent_incident": "",
                "priority": "5",
                "problem_id": "",
                "reassignment_count": "0",
                "reopen_count": "0",
                "resolved_at": "",
                "resolved_by": "",
                "rfc": "",
                "severity": "3",
                "short_description": "",
                "skills": "",
                "sla_due": "",
                "state": "1",
                "subcategory": "",
                "sys_class_name": "incident",
                "sys_created_by": "admin",
                "sys_created_on": "2013-07-23 18:01:17",
                "sys_domain": "global",
                "sys_id": "a96479343cb60100a92ec9a477ba9e45",
                "sys_mod_count": "0",
                "sys_updated_by": "admin",
                "sys_updated_on": "2013-07-23 18:01:17",
                "time_worked": "",
                "upon_approval": "proceed",
                "upon_reject": "cancel",
                "urgency": "3",
                "user_input": "",
                "watch_list": "",
                "work_end": "",
                "work_notes": "",
                "work_notes_list": "",
                "work_start": ""
            }
        ]
    }