package com.tencent.mm.plugin.appbrand.config;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.ab;
import java.util.LinkedList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class WxaAttributes$c {
    public String bIy;
    public String cvZ;
    public String path;
    public int version;

    public static List<WxaAttributes$c> zy(String str) {
        AppMethodBeat.i(96160);
        try {
            JSONArray jSONArray = new JSONArray(str);
            if (jSONArray.length() <= 0) {
                AppMethodBeat.o(96160);
                return null;
            }
            LinkedList linkedList = new LinkedList();
            for (int i = 0; i < jSONArray.length(); i++) {
                JSONObject jSONObject = jSONArray.getJSONObject(i);
                if (jSONObject != null) {
                    WxaAttributes$c wxaAttributes$c = new WxaAttributes$c();
                    wxaAttributes$c.bIy = jSONObject.optString("provider");
                    wxaAttributes$c.version = jSONObject.optInt("version");
                    wxaAttributes$c.path = jSONObject.optString("path");
                    wxaAttributes$c.cvZ = jSONObject.optString("md5");
                    linkedList.add(wxaAttributes$c);
                }
            }
            AppMethodBeat.o(96160);
            return linkedList;
        } catch (JSONException e) {
            ab.e("MicroMsg.AppBrand.WxaAttributes.WxaCodeLibInfo", "parse json array, e = %s", new Object[]{e});
            AppMethodBeat.o(96160);
            return null;
        }
    }
}
