package org.bdware.sc.engine.hook;

import com.google.gson.JsonElement;
import com.google.gson.JsonNull;
import com.google.gson.JsonPrimitive;
import org.bdware.sc.JSEngine;
import org.bdware.sc.bean.ContractRequest;
import org.bdware.sc.engine.JSONTool;
import org.bdware.sc.node.AnnotationHook;
import wrp.jdk.nashorn.api.scripting.ScriptObjectMirror;

public class ObjToJsonHandler implements AnnotationHook {
    @Override
    public Object handle(ContractRequest input, JSEngine desktopEngine, Object ret) {
        return JSONTool.convertMirrorToJson(ret);
    }
}
