// Path: src/main/java/com/github/quartzweb/utils/ExceptionUtils.java
// public class ExceptionUtils {
// 
//     /**
//      * 将异常转化为信息
//      * @param ex 异常
//      * @return
//      */
//     public static String getStackTrace(Throwable ex) {
//         StringWriter buf = new StringWriter();
//         ex.printStackTrace(new PrintWriter(buf));
//         return buf.toString();
//     }
// 
// }


import com.github.quartzweb.utils.ExceptionUtils;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.TabularData;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.Map;
                }
            }

        }


        //throw new IllegalArgumentException("not support type : " + o.getClass());
    }

    public void writeDate(Date date) {
        if (date == null) {
            writeNull();
            return;
        }

        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        writeString(dateFormat.format(date));
    }

    public void writeError(Throwable error) {
        if (error == null) {
            writeNull();
            return;
        }

        write("{\"Class\":");
        writeString(error.getClass().getName());
        write(",\"Message\":");
        writeString(error.getMessage());
        write(",\"StackTrace\":");
// Path: src/main/java/com/github/quartzweb/utils/ExceptionUtils.java
// public class ExceptionUtils {
// 
//     /**
//      * 将异常转化为信息
//      * @param ex 异常
//      * @return
//      */
//     public static String getStackTrace(Throwable ex) {
//         StringWriter buf = new StringWriter();
//         ex.printStackTrace(new PrintWriter(buf));
//         return buf.toString();
//     }
// 
// }


// Path: src/main/java/com/github/quartzweb/utils/json/JSONWriter.java
import com.github.quartzweb.utils.ExceptionUtils;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.TabularData;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Date;
import java.util.Map;

                }
            }

        }


        //throw new IllegalArgumentException("not support type : " + o.getClass());
    }

    public void writeDate(Date date) {
        if (date == null) {
            writeNull();
            return;
        }

        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        writeString(dateFormat.format(date));
    }

    public void writeError(Throwable error) {
        if (error == null) {
            writeNull();
            return;
        }

        write("{\"Class\":");
        writeString(error.getClass().getName());
        write(",\"Message\":");
        writeString(error.getMessage());
        write(",\"StackTrace\":");
        writeString(ExceptionUtils.getStackTrace(error));