@@ -0,0 +1,2576 @@
+package com.alibaba.json.bvt.issue_3000;%0A%0Aimport com.alibaba.fastjson.JSON;%0Aimport junit.framework.TestCase;%0A%0Aimport java.io.Serializable;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class Issue3131 extends TestCase %7B%0A    public void test_for_issue() throws Exception %7B%0A        List orgs = new ArrayList();%0A        UserOrg org = new UserOrg(%22111%22,%22222%22 );%0A        orgs.add(org);%0A        String s = JSON.toJSONString(new Orgs(%22111%22, orgs));%0A        System.out.println(s);%0A        Orgs userOrgs = JSON.parseObject(s, Orgs.class);%0A        System.out.println(JSON.toJSONString(userOrgs));%0A    %7D%0A%0A    public static class Orgs%3CT extends Org%3E implements Serializable%0A    %7B%0A        /**%0A         */%0A        private static final long serialVersionUID = -1L;%0A%0A        private String name;%0A%0A        private List%3CT%3E orgs;%0A%0A        public Orgs() %7B%0A%0A        %7D%0A%0A        public Orgs(String name, List%3CT%3E orgs)%0A        %7B%0A            this.name = name;%0A            this.orgs = orgs;%0A        %7D%0A%0A        public String getName()%0A        %7B%0A            return name;%0A        %7D%0A%0A        public void setName(String name)%0A        %7B%0A            this.name = name;%0A        %7D%0A%0A        public List%3CT%3E getOrgs()%0A        %7B%0A            return orgs;%0A        %7D%0A%0A        public void setOrgs(List%3CT%3E orgs)%0A        %7B%0A            this.orgs = orgs;%0A        %7D%0A%0A        public void add(T org) %7B%0A            if (orgs == null) %7B%0A                orgs = new ArrayList%3CT%3E();%0A            %7D%0A            orgs.add(org);%0A        %7D%0A    %7D%0A%0A    public static class UserOrg extends Org implements Serializable%7B%0A%0A        private String name;%0A%0A        private String idcard;%0A%0A        public UserOrg() %7B%0A%0A        %7D%0A%0A        public UserOrg(String name, String idcard)%0A        %7B%0A            super (name);%0A            this.name = name;%0A            this.idcard = idcard;%0A        %7D%0A%0A        public String getName()%0A        %7B%0A            return name;%0A        %7D%0A%0A        public void setName(String name)%0A        %7B%0A            this.name = name;%0A        %7D%0A%0A        public String getIdcard()%0A        %7B%0A            return idcard;%0A        %7D%0A%0A        public void setIdcard(String idcard)%0A        %7B%0A            this.idcard = idcard;%0A        %7D%0A    %7D%0A%0A    public static abstract class Org implements Serializable%7B%0A%0A        private String name;%0A%0A        public Org() %7B%0A%0A        %7D%0A%0A        public Org(String name)%0A        %7B%0A            this.name = name;%0A        %7D%0A%0A        public String getName()%0A        %7B%0A            return name;%0A        %7D%0A%0A        public void setName(String name)%0A        %7B%0A            this.name = name;%0A        %7D%0A    %7D%0A%7D%0A

add testcase