    @Test
    public void test() throws IOException {

        JavaDoc javaDoc = read();


        JSONArray array = new JSONArray(1024);
        for (ClassDoc value : javaDoc.getClassDocs().values()) {
            array.add(JSON.toJSON(value));
        }
        for (ClassDoc value : javaDoc.getIncludeClassDocs().values()) {
            array.add(JSON.toJSON(value));
        }

        System.out.println("==========================");

//        ClassDoc c1 = javaDoc.getClassDocs().get("org.genx.javadoc.controller.AppController");
//        System.out.println(JSON.toJSONString(c1));


        ClassDoc c2 = javaDoc.getClassDocs().get("org.genx.javadoc.test.JavaDocTest");
        System.out.println(JSON.toJSONString(c2));


        ClassDoc c3 = javaDoc.getClassDocs().get("org.genx.javadoc.entity.UserDetail");
        System.out.println(JSON.toJSONString(c3));

//        try {
//            FileOutputStream fileOut =
//                    new FileOutputStream("D:/work/javadoc/javadoc.ser");
//            ObjectOutputStream out = new ObjectOutputStream(fileOut);
//            out.writeObject(javaDoc);
//            out.close();
//            fileOut.close();
//            System.out.printf("Serialized data is saved in /tmp/employee.ser");
//        } catch (IOException i) {
//            i.printStackTrace();
//        }
//
//        IOUtils.write(array.toJSONString(), new FileOutputStream("D:/work/javadoc/javadoc.json"), Charsets.UTF_8);

    }