목록JSONArray (19)
투케이2K

[개발 환경 설정]개발 툴 : VsCode개발 언어 : python [소스 코드]# --------------------------------------------------------------# [import]# --------------------------------------------------------------import json# --------------------------------------------------------------# --------------------------------------------------------------# [요약 설명]# --------------------------------------------------------------..

[개발 환경 설정] 개발 언어 : C# / NET [소스 코드] using System; using System.Collections; using System.Data; using System.Diagnostics.Tracing; using System.Text; using System.Text.Json.Serialization; using System.Web; using System.Text.Json; using System.Text.Encodings.Web; using System.Text.Unicode; namespace testProject { // [Json 데이터 모델 객체] public class User { public string name { get; set; } public in..

[개발 환경 설정] 개발 언어 : C# / NET [소스 코드] using System; using System.Collections; using System.Data; using System.Diagnostics.Tracing; using System.Text; using System.Text.Json.Serialization; using System.Web; using System.Text.Json; using System.Text.Encodings.Web; using System.Text.Unicode; namespace testProject { // [Json 데이터 모델 객체] public class User { public string name { get; set; } public in..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" ) func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // JSON (JavaScript Object Notation) 은 데이터를 교환하는 한 포맷 방식으로 key , value 형식으로 데이터를 생성할 수 있습니다 // --------------------------------------------------- // Go 에서 JSON 을 사용하기 위해서는 표준패키지 en..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" ) func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // JSON (JavaScript Object Notation) 은 데이터를 교환하는 한 포맷 방식으로 key , value 형식으로 데이터를 생성할 수 있습니다 // --------------------------------------------------- // Go 에서 JSON 을 사용하기 위해서는 표준패키지 en..

[개발 환경 설정] 개발 언어 : Go [소스 코드] package main import ( "encoding/json" "fmt" ) func main() { // --------------------------------------------------- // [기본 설명] // --------------------------------------------------- // JSON (JavaScript Object Notation) 은 데이터를 교환하는 한 포맷 방식으로 key , value 형식으로 데이터를 생성할 수 있습니다 // --------------------------------------------------- // Go 에서 JSON 을 사용하기 위해서는 표준패키지 en..

[개발 환경 설정] 개발 툴 : AndroidStudio 개발 언어 : Kotlin [소스 코드] // TODO [테스트 메소드 정의 실시] fun testMain(){ Log.i("---","---") Log.d("//===========//","================================================") Log.i("","\n"+"[Test_Kotlin > testMain() 메소드 : 테스트 함수 동작 실시]") Log.d("//===========//","================================================") Log.i("---","---") /** * ------------------------------------ * T..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] // MARK: - [배열 + 딕셔너리 데이터를 JsonArray + JsonObject 형태 String 문자열 데이터 반환 실시] func arrayDic_To_jsonArrayInJsonObj_String(list: Array) -> String { /* // ----------------------------------------- [arrayDic_To_jsonArrayInJsonObj_String 메소드 설명] // ----------------------------------------- 1. 배열 + 딕셔너리 데이터를 JsonArray + JsonObject 형태 String 문자열 데이터 반환 실시 ..

[개발 환경 설정] 개발 툴 : AndroidStudio 개발 언어 : java [소스 코드] public void testMain(){ try { // [초기 jsonArray 객체 생성 실시] JSONArray jsonArray = new JSONArray(); // [jsonObj 데이터 생성 실시] JSONObject jsonObject_1 = new JSONObject(); jsonObject_1.put("key_1", "value_1"); jsonObject_1.put("step", 1); JSONObject jsonObject_3 = new JSONObject(); jsonObject_3.put("key_3", "value_3"); jsonObject_3.put("step", 3); ..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] // [테스트 메인 함수 정의 실시] func testMain() { print("") print("===============================") print("[testMain : Program Start]") print("===============================") print("") // MARK: - [jsonArray - jsonObject 형식 데이터 생성] var _array: Array = [] // 배열 선언 for i in stride(from: 1, through: 3, by: 1) { // 데이터 삽입 실시 // 딕셔너리 사용해 jsonObject 생성 let _dic..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] /* [요약 설명] 1. json : key , value 로 이루어진 데이터 전송 포맷 형식입니다 2. jsonObject : json key, value 형태로 이루어져있습니다 3. jsonArray : 배열 형식 형태로 이루어져있습니다 */ // [테스트 메인 함수 정의 실시] func testMain() { print("[Program Start]") print("") // ===== [json 데이터 생성 부분] ===== // 배열 데이터 생성 실시 let colorArray: Array = ["red", "yellow", 10, 20] // Dictionary 사용해 json 데이터 생성 실시 let j..

[개발 환경 설정] 개발 툴 : AndroidStudio 개발 언어 : java [소스 코드] // TODO [MAP TO JSON OBJECT] public static void mapToJsonObj(){ System.out.println("\n"); System.out.println("======================================="); System.out.println("[mapToJsonObj] : [start]"); System.out.println("======================================="); System.out.println("\n"); // [초기 map 선언 및 데이터 삽입 실시] Map map = new HashMap();..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : inteli j 개발 언어 : spring /* =========================== */ /* =========================== */ [폴더 및 파일 추가] /* =========================== */ /* =========================== */ [소스 코드 : controller >> ModuleApiController] package com.project.solutionpackage.controller; import com.project.solutionpackage.model.Font; import org.springframewo..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Edit++ 개발 언어 : javascript /* =========================== */ /* =========================== */ [소스 코드] /* =========================== */ /* =========================== */ [결과 출력] /* =========================== */ /* =========================== */ [요약 설명] /* [JS 요약 설명] 1. var jsonArry = [] : jsonArray 초기 선언할 수 있는 방법입니다 2. var json..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Edit++ 개발 언어 : javascript /* =========================== */ /* =========================== */ [소스 코드] /* =========================== */ /* =========================== */ [결과 출력] /* =========================== */ /* =========================== */ [요약 설명] /* [요약 설명] 1. JSON.stringify : 인수로 전달받은 자바스크립트 객체를 문자열로 변환하여 반환합니다 2. JSON.p..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : AndroidStudio 개발 언어 : java /* =========================== */ /* =========================== */ [소스 코드] //========== [java - json 파일 생성] ========== public void setJsonArrayData(){ try { //TODO JSONArray 객체 생성 및 데이터 삽입 실시 JSONArray jsonArray = new JSONArray(); jsonArray.put("ONE_INFO"); JSONObject jsonObject_One = new JSONObject(); jsonObje..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package AI4; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; public class MainActivity3 { public static void main(String[] args) { // ..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package AI4; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; public class MainActivity3 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.pri..

/* =========================== */ [ 개발 환경 설정 ] 개발 툴 : Eclipse 개발 언어 : Java /* =========================== */ /* =========================== */ [소스 코드] package AI4; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; public class MainActivity3 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.pri..