Person person1 = new Person("1","fastjson1",1); Person person2 = new Person("2","fastjson2",2); List<Person> persons = new ArrayList<Person>(); persons.add(person1); persons.add(person2); String jsonString = JSON.toJSONString(persons); System.out.println("json字符串:"+jsonString);