// Path: src/main/java/com/khs/sherpa/exception/SherpaRuntimeException.java
// public class SherpaRuntimeException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 3997371687805128093L;
// 
// 	public SherpaRuntimeException() {
// 		super();
// 	}
// 
// 	public SherpaRuntimeException(String arg0, Throwable arg1) {
// 		super(arg0, arg1);
// 	}
// 
// 	public SherpaRuntimeException(String arg0) {
// 		super(arg0);
// 	}
// 
// 	public SherpaRuntimeException(Throwable arg0) {
// 		super(arg0);
// 	}
// 
// }
// 
// Path: src/main/java/com/khs/sherpa/json/service/JsonProvider.java
// public interface JsonProvider {
// 
// 	public String toJson(Object object);
// 	
// 	public <T> T toObject(String json, Class<T> type);
// }


import java.io.IOException;
import java.io.OutputStream;
import com.khs.sherpa.exception.SherpaRuntimeException;
import com.khs.sherpa.json.service.JsonProvider;
			JsonUtil.map(object, provider, out);
		}
	}
	
	public static void map(Object object, JsonProvider provider, OutputStream out) {
		try {	
			if(object != null) {
			  out.write(provider.toJson(object).getBytes());
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void error(String msg, JsonProvider provider, OutputStream out, String callback) {
		if (callback != null) {
			JsonUtil.mapJsonp(new Result("ERROR", msg), provider, out, callback);
		} else {
			JsonUtil.map(new Result("ERROR", msg), provider, out);
		}
	}
	
	public static void error(String msg, JsonProvider provider, OutputStream out) {
		map(new Result("ERROR", msg), provider, out);
	}
	
	public static void info(String msg, JsonProvider provider, OutputStream out) {
		map(new Result("INFO", msg), provider, out);
	}

// Path: src/main/java/com/khs/sherpa/exception/SherpaRuntimeException.java
// public class SherpaRuntimeException extends RuntimeException {
// 
// 	private static final long serialVersionUID = 3997371687805128093L;
// 
// 	public SherpaRuntimeException() {
// 		super();
// 	}
// 
// 	public SherpaRuntimeException(String arg0, Throwable arg1) {
// 		super(arg0, arg1);
// 	}
// 
// 	public SherpaRuntimeException(String arg0) {
// 		super(arg0);
// 	}
// 
// 	public SherpaRuntimeException(Throwable arg0) {
// 		super(arg0);
// 	}
// 
// }
// 
// Path: src/main/java/com/khs/sherpa/json/service/JsonProvider.java
// public interface JsonProvider {
// 
// 	public String toJson(Object object);
// 	
// 	public <T> T toObject(String json, Class<T> type);
// }


// Path: src/main/java/com/khs/sherpa/util/JsonUtil.java
import java.io.IOException;
import java.io.OutputStream;
import com.khs.sherpa.exception.SherpaRuntimeException;
import com.khs.sherpa.json.service.JsonProvider;

			JsonUtil.map(object, provider, out);
		}
	}
	
	public static void map(Object object, JsonProvider provider, OutputStream out) {
		try {	
			if(object != null) {
			  out.write(provider.toJson(object).getBytes());
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static void error(String msg, JsonProvider provider, OutputStream out, String callback) {
		if (callback != null) {
			JsonUtil.mapJsonp(new Result("ERROR", msg), provider, out, callback);
		} else {
			JsonUtil.map(new Result("ERROR", msg), provider, out);
		}
	}
	
	public static void error(String msg, JsonProvider provider, OutputStream out) {
		map(new Result("ERROR", msg), provider, out);
	}
	
	public static void info(String msg, JsonProvider provider, OutputStream out) {
		map(new Result("INFO", msg), provider, out);
	}

	public static void error(SherpaRuntimeException ex, JsonProvider provider, OutputStream out) {