json解析实体类

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/JY_He/article/details/81290961

多层json解析实体类样例:

主类:

package JsonPOJO;

import java.util.List;


public class JsonObject {

    private List<Nodes> nodes ;

    private List<Links> links ;

    public void setNodes(List<Nodes> nodes){
        this.nodes = nodes;
    }
    public List<Nodes> getNodes(){
        return this.nodes;
    }
    public void setLinks(List<Links> links){
        this.links = links;
    }
    public List<Links> getLinks(){
        return this.links;
    }


}

Nodes类:

package JsonPOJO;


public class Nodes {
    private int id;

    private String name;

    private int type;

    private boolean innode;

    private Properties properties;

    private class Properties {
        private String regno;

        private String esdate;

        private String regcap;

        private String industryphy_desc;

        private String name;

        private String entstatus;

        private String islist;

        private String industryphy;

        public void setRegno(String regno){
            this.regno = regno;
        }
        public String getRegno(){
            return this.regno;
        }
        public void setEsdate(String esdate){
            this.esdate = esdate;
        }
        public String getEsdate(){
            return this.esdate;
        }
        public void setRegcap(String regcap){
            this.regcap = regcap;
        }
        public String getRegcap(){
            return this.regcap;
        }
        public void setIndustryphy_desc(String industryphy_desc){
            this.industryphy_desc = industryphy_desc;
        }
        public String getIndustryphy_desc(){
            return this.industryphy_desc;
        }
        public void setName(String name){
            this.name = name;
        }
        public String getName(){
            return this.name;
        }
        public void setEntstatus(String entstatus){
            this.entstatus = entstatus;
        }
        public String getEntstatus(){
            return this.entstatus;
        }
        public void setIslist(String islist){
            this.islist = islist;
        }
        public String getIslist(){
            return this.islist;
        }
        public void setIndustryphy(String industryphy){
            this.industryphy = industryphy;
        }
        public String getIndustryphy(){
            return this.industryphy;
        }

    }

    public void setId(int id){
        this.id = id;
    }
    public int getId(){
        return this.id;
    }
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return this.name;
    }
    public void setType(int type){
        this.type = type;
    }
    public int getType(){
        return this.type;
    }
    public void setInnode(boolean innode){
        this.innode = innode;
    }
    public boolean getInnode(){
        return this.innode;
    }
    public void setProperties(Properties properties){
        this.properties = properties;
    }
    public Properties getProperties(){
        return this.properties;
    }
}

Links类:

package JsonPOJO;


public class Links {
    private int id;

    private int type;

    private int from;

    private int to;

    private Properties properties;

    private class Properties {
        private String conprop;

        private String currency_desc;

        private String currency;

        private String subconam;

        private String condate;

        private String position_desc;

        private String position;

        private boolean legal;

        public void setConprop(String conprop){
            this.conprop = conprop;
        }
        public String getConprop(){
            return this.conprop;
        }
        public void setCurrency_desc(String currency_desc){
            this.currency_desc = currency_desc;
        }
        public String getCurrency_desc(){
            return this.currency_desc;
        }
        public void setCurrency(String currency){
            this.currency = currency;
        }
        public String getCurrency(){
            return this.currency;
        }
        public void setSubconam(String subconam){
            this.subconam = subconam;
        }
        public String getSubconam(){
            return this.subconam;
        }
        public void setCondate(String condate){
            this.condate = condate;
        }
        public String getCondate(){
            return this.condate;
        }
        public void setPosition_desc(String position_desc){
            this.position_desc = position_desc;
        }
        public String getPosition_desc(){
            return this.position_desc;
        }
        public void setPosition(String position){
            this.position = position;
        }
        public String getPosition(){
            return this.position;
        }
        public void setLegal(boolean legal){
            this.legal = legal;
        }
        public boolean getLegal(){
            return this.legal;
        }

    }

    public void setId(int id){
        this.id = id;
    }
    public int getId(){
        return this.id;
    }
    public void setType(int type){
        this.type = type;
    }
    public int getType(){
        return this.type;
    }
    public void setFrom(int from){
        this.from = from;
    }
    public int getFrom(){
        return this.from;
    }
    public void setTo(int to){
        this.to = to;
    }
    public int getTo(){
        return this.to;
    }
    public void setProperties(Properties properties){
        this.properties = properties;
    }
    public Properties getProperties(){
        return this.properties;
    }
}

猜你喜欢

转载自blog.csdn.net/JY_He/article/details/81290961