// Path: naive-core/src/main/java/com/goribun/naive/core/constants/Const.java
// public class Const {
// 
//     //扫描rpc服务的包路径配置key
//     public static final String SCAN_PACKAGE_KEY_ = "scanPackage";
// 
//     public static final String IS_TRACE_STACK = "isTraceStack";
// 
//     //日期格式
//     public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss SSS";
// 
// 
// }


import com.alibaba.fastjson.JSONObject;
import com.goribun.naive.core.constants.Const;
package com.goribun.naive.core.serial;


/**
 * 调用方法序列化与反序列化工具
 *
 * @author chenchuan
 */
public class MethodCallUtil {
    public static MethodCallEntity getMethodCallEntity(String args) {
        return JSONObject.parseObject(args, MethodCallEntity.class);
    }

    public static String getMethodCallStr(MethodCallEntity entity) {
// Path: naive-core/src/main/java/com/goribun/naive/core/constants/Const.java
// public class Const {
// 
//     //扫描rpc服务的包路径配置key
//     public static final String SCAN_PACKAGE_KEY_ = "scanPackage";
// 
//     public static final String IS_TRACE_STACK = "isTraceStack";
// 
//     //日期格式
//     public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss SSS";
// 
// 
// }


// Path: naive-core/src/main/java/com/goribun/naive/core/serial/MethodCallUtil.java
import com.alibaba.fastjson.JSONObject;
import com.goribun.naive.core.constants.Const;

package com.goribun.naive.core.serial;


/**
 * 调用方法序列化与反序列化工具
 *
 * @author chenchuan
 */
public class MethodCallUtil {
    public static MethodCallEntity getMethodCallEntity(String args) {
        return JSONObject.parseObject(args, MethodCallEntity.class);
    }

    public static String getMethodCallStr(MethodCallEntity entity) {
        return JSONObject.toJSONStringWithDateFormat(entity, Const.DEFAULT_DATE_FORMAT);