关于json转bean的问题?

{"result":[{"provinceName":"北京","provinceAdcode":"110000","scs":[{"cityName":"北京","cityAdcode":"110000","storeCount":8,"stores":[{"storeId":"438756a3-c82c-413b-81ad-9a10ba57aa22","name":"#书店","phone":"136444333443","adcode":"110101","address":"火之国木叶村金城中心902","description":"","ownerName":null,"createTime":1437468277000,"recordStatus":0,"safetyId":"111"},{"storeId":"712bd2b5-d339-49cb-85c2-f4a282d538da","name":"花姑娘店","phone":"010-68953265","adcode":"110101","address":"北京市海淀区","description":"","ownerName":null,"createTime":1438087562000,"recordStatus":0,"safetyId":"111"},{"storeId":"7ec4f6bc-4d92-4275-a1ee-264b0f37c113","name":"?一堂南京店","phone":"13567895432","adcode":"110101","address":"23344","description":"送达","ownerName":null,"createTime":1438135291000,"recordStatus":0,"safetyId":"111"},{"storeId":"841ec798-acbb-475b-9a2c-8064c07077c4","name":"#珠宝店","phone":"13423232221","adcode":"110103","address":"火之国木叶村金城中心902","description":"","ownerName":"薛菲","createTime":1437468251000,"recordStatus":0,"safetyId":"111"},{"storeId":"8eb18be8-ff74-450c-82bc-1740b955cc97","name":"dede1","phone":"010-65855500","adcode":"110101","address":"6333","description":"222122222","ownerName":null,"createTime":1438784180000,"recordStatus":0,"safetyId":"100088"},{"storeId":"949ec894-c34d-4211-ab46-d188776a8e95","name":"方庄店","phone":"1352254558","adcode":"110106","address":"金城中心902室","description":"方庄店","ownerName":"嘿嘿","createTime":1434444128000,"recordStatus":0,"safetyId":"111"},{"storeId":"bf72813e-e082-42a7-bc2b-77a5c26e0c0f","name":"#花店2","phone":"13567898765","adcode":"110102","address":"哈哈","description":"哈哈","ownerName":null,"createTime":1437571418000,"recordStatus":0,"safetyId":"111"},{"storeId":"fdb89119-40a4-44c4-831c-24edc09637ef","name":"安贞店","phone":"13855854854","adcode":"110105","address":"朝阳路100号","description":"测试","ownerName":"找小二","createTime":1434444108000,"recordStatus":0,"safetyId":"111"}]}]}],"description":"操作成功","status":true}

把上面的json转为bean

bean 如下:


import java.util.List;

public class SysStoreLMvo {
    
    private String provinceName;
    
    private String provinceAdcode;
    
    private List<SysStoreCityMvo> scs;

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getProvinceAdcode() {
        return provinceAdcode;
    }

    public void setProvinceAdcode(String provinceAdcode) {
        this.provinceAdcode = provinceAdcode;
    }

    public List<SysStoreCityMvo> getScs() {
        return scs;
    }

    public void setScs(List<SysStoreCityMvo> scs) {
        this.scs = scs;
    }
}

import java.util.List;

public class SysStoreCityMvo {
    
    private String cityName;
    
    private String cityAdcode;
    
    private Integer storeCount;
    
    private List<SysStore> stores;

    public List<SysStore> getStores() {
        return stores;
    }

    public void setStores(List<SysStore> stores) {
        this.stores = stores;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getCityAdcode() {
        return cityAdcode;
    }

    public void setCityAdcode(String cityAdcode) {
        this.cityAdcode = cityAdcode;
    }

    public Integer getStoreCount() {
        return storeCount;
    }

    public void setStoreCount(Integer storeCount) {
        this.storeCount = storeCount;
    }
    
    
}

import java.util.Date;
import java.util.UUID;

public class SysStore {
    private String storeId;

    private String name;

    private String phone;

    private String adcode;

    private String address;

    private String description;

    private String ownerName;

    private Date createTime;

    private Integer recordStatus;

    private String safetyId;
    
    public SysStore() {
        storeId = UUID.randomUUID().toString();
    }
    
    public String getStoreId() {
        return storeId;
    }

    public void setStoreId(String storeId) {
        this.storeId = storeId == null ? null : storeId.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getAdcode() {
        return adcode;
    }

    public void setAdcode(String adcode) {
        this.adcode = adcode == null ? null : adcode.trim();
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public String getOwnerName() {
        return ownerName;
    }

    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName == null ? null : ownerName.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getRecordStatus() {
        return recordStatus;
    }

    public void setRecordStatus(Integer recordStatus) {
        this.recordStatus = recordStatus;
    }

    public String getSafetyId() {
        return safetyId;
    }

    public void setSafetyId(String safetyId) {
        this.safetyId = safetyId == null ? null : safetyId.trim();
    }
}

如何转啊?有没有api

查看回复