package com.tencent.mm.plugin.appbrand.dynamic.d.a;

import android.util.Log;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.aa.h;
import com.tencent.mm.plugin.appbrand.dynamic.i.b;
import com.tencent.mm.sdk.platformtools.ab;
import com.tencent.mm.sdk.platformtools.ae;
import com.tencent.mm.sdk.platformtools.bo;
import org.json.JSONObject;

class c$1 extends ae<String, JSONObject> {
    final /* synthetic */ c hnn;

    c$1(c cVar) {
        this.hnn = cVar;
        super(10);
    }

    public final /* synthetic */ Object create(Object obj) {
        AppMethodBeat.i(10869);
        JSONObject Ag = Ag((String) obj);
        AppMethodBeat.o(10869);
        return Ag;
    }

    private static JSONObject Ag(String str) {
        AppMethodBeat.i(10868);
        try {
            if (bo.isNullOrNil(str)) {
                str = "{}";
            }
            long nanoTime = System.nanoTime();
            JSONObject lw = h.lw(str);
            b.f(System.nanoTime() - nanoTime, str.length());
            AppMethodBeat.o(10868);
            return lw;
        } catch (Exception e) {
            ab.e("MicroMsg.DefaultJsApiExecutor", Log.getStackTraceString(e));
            AppMethodBeat.o(10868);
            return null;
        }
    }
}
