net.sf.JSONArray

Addrees类和上篇net.sf.JSONObject

例子中用的是同一个类

package com.dean.test;
import com.dean.Address;

import net.sf.json.JSONArray;

public class Test {

    public static void main(String[] args) {
        Address address = new Address();
        address.setNo("1068");
        address.setProvince("桃源省");
        address.setRoad("东篱路");
        address.setStreet("南山街");
        JSONArray json = JSONArray.fromObject(address);
        System.out.println(json);
    }

}
阅读更多
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页