TestJSON.java.svn-base
资源名称:cindyblog.rar [点击查看]
上传用户:cdpainuo
上传日期:2022-07-12
资源大小:5257k
文件大小:0k
源码类别:
Jsp/Servlet
开发平台:
Java
- package test;
- import java.util.ArrayList;
- import java.util.List;
- import org.json.JSONArray;
- public class TestJSON {
- public static void main(String[] args) {
- List l = new ArrayList();
- Employee e1 = new Employee(1,"tom");
- Employee e2 = new Employee(2,"jarry");
- l.add(e1);
- l.add(e2);
- JSONArray j = new JSONArray(l,false);
- System.out.println(j.toString());
- }
- }