[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/TypeP/excel_pdf/master/JavaTPCProject/src/Project01_B.java [Back]  [Original]

import org.json.JSONArray;
import org.json.JSONObject;

public class Project01_B {

	public static void main(String[] args) {
		// JSON-Java(org.json)
		JSONArray students=new JSONArray();
		
		JSONObject student= new JSONObject();
		student.put("name", "");
		student.put("phone", "010-1111-1111");
		student.put("address", "");
		System.out.println(student);
		students.put(student);
		
		
		student= new JSONObject();
		student.put("name", "");
		student.put("phone", "010-2222-2222");
		student.put("address", "");
		
		students.put(student);
		
		JSONObject object=new JSONObject();
		
		object.put("students", students);
		System.out.println("students"+students);
		System.out.println(object.toString(2));
		

	}

}

Web Proxy Viewer  |  New URL  |  Original Page